mirror of
https://github.com/home-assistant/core.git
synced 2025-07-27 15:17:35 +00:00
Fix Tado Power and Link binary sensors (#46235)
Power and Link aren't converted from strings to booleans by python-tado, so we need to properly parse before assigning the string value to binary sensors. Fixes: 067f2d0098d1 ("Add tado zone binary sensors (#44576)") Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
This commit is contained in:
parent
71d7ae5992
commit
fcae840641
@ -244,10 +244,10 @@ class TadoZoneBinarySensor(TadoZoneEntity, BinarySensorEntity):
|
|||||||
return
|
return
|
||||||
|
|
||||||
if self.zone_variable == "power":
|
if self.zone_variable == "power":
|
||||||
self._state = self._tado_zone_data.power
|
self._state = self._tado_zone_data.power == "ON"
|
||||||
|
|
||||||
elif self.zone_variable == "link":
|
elif self.zone_variable == "link":
|
||||||
self._state = self._tado_zone_data.link
|
self._state = self._tado_zone_data.link == "ONLINE"
|
||||||
|
|
||||||
elif self.zone_variable == "overlay":
|
elif self.zone_variable == "overlay":
|
||||||
self._state = self._tado_zone_data.overlay_active
|
self._state = self._tado_zone_data.overlay_active
|
||||||
|
Loading…
x
Reference in New Issue
Block a user