From 7f47d601f172689032020b2b8c1a4d6078791d81 Mon Sep 17 00:00:00 2001 From: Greg Laabs Date: Sun, 30 Sep 2018 00:21:27 -0700 Subject: [PATCH] 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). --- homeassistant/components/light/isy994.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/homeassistant/components/light/isy994.py b/homeassistant/components/light/isy994.py index 4349bfa1467..d54aa3cd4ce 100644 --- a/homeassistant/components/light/isy994.py +++ b/homeassistant/components/light/isy994.py @@ -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."""