mirror of
https://github.com/home-assistant/core.git
synced 2026-05-04 11:54:35 +02:00
Merge pull request #1276 from balloob/fix_efergy_key_error
Catch KeyError as well as ValueError when handling efergy errors.
This commit is contained in:
@@ -97,5 +97,5 @@ class EfergySensor(Entity):
|
||||
self._state = response.json()['sum']
|
||||
else:
|
||||
self._state = 'Unknown'
|
||||
except (RequestException, ValueError):
|
||||
except (RequestException, ValueError, KeyError):
|
||||
_LOGGER.warning('Could not update status for %s', self.name)
|
||||
|
||||
Reference in New Issue
Block a user