mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 13:17:32 +00:00
Fix ISY blocking bug (#16978)
This fix results in `is_on` returning False if the state is unknown (which was a bug in 0.79).
This commit is contained in:
parent
8b1bdda0fa
commit
7f47d601f1
@ -31,12 +31,14 @@ class ISYLightDevice(ISYDevice, Light):
|
||||
@property
|
||||
def is_on(self) -> bool:
|
||||
"""Get whether the ISY994 light is on."""
|
||||
if self.is_unknown():
|
||||
return False
|
||||
return self.value != 0
|
||||
|
||||
@property
|
||||
def brightness(self) -> float:
|
||||
"""Get the brightness of the ISY994 light."""
|
||||
return self.value
|
||||
return None if self.is_unknown() else self.value
|
||||
|
||||
def turn_off(self, **kwargs) -> None:
|
||||
"""Send the turn off command to the ISY994 light device."""
|
||||
|
Loading…
x
Reference in New Issue
Block a user