mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 21:27:38 +00:00
Fix hydroquebec (#6574)
This commit is contained in:
parent
5722cf53bf
commit
253dee8e4d
@ -149,7 +149,8 @@ class HydroQuebecSensor(Entity):
|
|||||||
def update(self):
|
def update(self):
|
||||||
"""Get the latest data from Hydroquebec and update the state."""
|
"""Get the latest data from Hydroquebec and update the state."""
|
||||||
self.hydroquebec_data.update()
|
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):
|
class HydroquebecData(object):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user