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:
parent
71d7ae5992
commit
fcae840641
1 changed files with 2 additions and 2 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue