mirror of
https://github.com/home-assistant/core.git
synced 2025-07-08 22:07:10 +00:00
* 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
@ -79,5 +79,8 @@ class VeraLight(VeraDevice, Light):
|
|||||||
def update(self):
|
def update(self):
|
||||||
"""Call to update state."""
|
"""Call to update state."""
|
||||||
self._state = self.vera_device.is_switched_on()
|
self._state = self.vera_device.is_switched_on()
|
||||||
|
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._brightness = self.vera_device.get_brightness()
|
||||||
self._color = self.vera_device.get_color()
|
self._color = self.vera_device.get_color()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user