Fix minor bug in flux led
This commit is contained in:
parent
b7ebf3b1eb
commit
0a78b69ee2
1 changed files with 3 additions and 2 deletions
|
@ -112,14 +112,15 @@ class FluxLight(Light):
|
|||
|
||||
def turn_on(self, **kwargs):
|
||||
"""Turn the specified or all lights on."""
|
||||
if not self.is_on:
|
||||
self._bulb.turnOn()
|
||||
|
||||
rgb = kwargs.get(ATTR_RGB_COLOR)
|
||||
brightness = kwargs.get(ATTR_BRIGHTNESS)
|
||||
if rgb:
|
||||
self._bulb.setRgb(*tuple(rgb))
|
||||
elif brightness:
|
||||
self._bulb.setWarmWhite255(brightness)
|
||||
else:
|
||||
self._bulb.turnOn()
|
||||
|
||||
def turn_off(self, **kwargs):
|
||||
"""Turn the specified or all lights off."""
|
||||
|
|
Loading…
Add table
Reference in a new issue