mirror of
https://github.com/home-assistant/core.git
synced 2025-08-05 21:55:10 +02: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: 067f2d0098
("Add tado zone binary sensors (#44576)")
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
This commit is contained in:
committed by
GitHub
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
|
||||||
|
Reference in New Issue
Block a user