* Fix lights issue #8098 * Don't check self._color to decide whether to calll get_color() self._color is None on init, so get_color() will never be called.
This commit is contained in:
parent
b2d6ff9783
commit
3bbaf37193
1 changed files with 5 additions and 2 deletions
|
@ -79,5 +79,8 @@ class VeraLight(VeraDevice, Light):
|
|||
def update(self):
|
||||
"""Call to update state."""
|
||||
self._state = self.vera_device.is_switched_on()
|
||||
self._brightness = self.vera_device.get_brightness()
|
||||
self._color = self.vera_device.get_color()
|
||||
if self.vera_device.is_dimmable:
|
||||
# If it is dimmable, both functions exist. In case color
|
||||
# is not supported, it will return None
|
||||
self._brightness = self.vera_device.get_brightness()
|
||||
self._color = self.vera_device.get_color()
|
||||
|
|
Loading…
Add table
Reference in a new issue