support color and brightness in flux_led light
This commit is contained in:
parent
2109b7a1b9
commit
895454b6c3
1 changed files with 3 additions and 1 deletions
|
@ -135,7 +135,9 @@ class FluxLight(Light):
|
|||
rgb = kwargs.get(ATTR_RGB_COLOR)
|
||||
brightness = kwargs.get(ATTR_BRIGHTNESS)
|
||||
effect = kwargs.get(ATTR_EFFECT)
|
||||
if rgb:
|
||||
if rgb and brightness:
|
||||
self._bulb.setRgb(*tuple(rgb), brightness=brightness)
|
||||
elif rgb:
|
||||
self._bulb.setRgb(*tuple(rgb))
|
||||
elif brightness:
|
||||
if self._mode == 'rgbw':
|
||||
|
|
Loading…
Add table
Reference in a new issue