diff --git a/custom_components/smartir/light.py b/custom_components/smartir/light.py index 8f783bfa..1f976bf9 100644 --- a/custom_components/smartir/light.py +++ b/custom_components/smartir/light.py @@ -165,6 +165,11 @@ def name(self): """Return the display name of the light.""" return self._name + @property + def state(self): + """Return the current state.""" + return self._state + @property def color_mode(self): # We only support a single color mode currently, so no need to track it @@ -178,15 +183,22 @@ def color_temp_kelvin(self): def min_color_temp_kelvin(self): if self._colortemps: return self._colortemps[0] + else: + return None @property def max_color_temp_kelvin(self): if self._colortemps: return self._colortemps[-1] + else: + return None @property def is_on(self): - return self._state == STATE_ON or self._on_by_remote + if self._state == STATE_ON: + return True + else: + return False @property def brightness(self):