1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-24 21:06:19 +00:00

Catch KeyError as well as ValueError when handling efergy errors.

This commit is contained in:
pavoni
2016-02-16 12:05:00 +00:00
parent 1d7aea7120
commit 9a6c99264e

View File

@@ -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)