Fix hydroquebec (#6574)

This commit is contained in:
Thibault Cohen authored and Paulus Schoutsen committed 2017-03-15 23:17:17 -07:00
1 parent aeeb927e19
commit a3cd7d653d
1 file changed
+2 -1
@@ -149,7 +149,8 @@ class HydroQuebecSensor(Entity):
def update(self):
"""Get the latest data from Hydroquebec and update the state."""
self.hydroquebec_data.update()
self._state = round(self.hydroquebec_data.data[self.type], 2)
if self.type in self.hydroquebec_data.data:
self._state = round(self.hydroquebec_data.data[self.type], 2)
class HydroquebecData(object):