Skip to content

Commit

Permalink
Fix for Keyerror 'mode' issue
Browse files Browse the repository at this point in the history
  • Loading branch information
mww012 committed Mar 26, 2020
1 parent 9244a99 commit f78bf0a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion custom_components/infinitive/climate.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,9 @@ def hvac_action(self):
def update(self):
"""Update current status from infinitive device."""
_LOGGER.debug("Updating Infinitive status")
self._status = self._inf_device.get_status()
status = self._inf_device.get_status()
if 'mode' in status.keys():
self._status = status
try:
self._hvac_mode = self._status['mode']
self._target_temperature_high = self._status['coolSetpoint']
Expand Down

0 comments on commit f78bf0a

Please sign in to comment.