Merge pull request #4373 from home-assistant/flux_led_color_bright

support color and brightness in flux_led light
pull/4372/merge
Daniel Høyer Iversen 2016-11-13 20:33:48 +01:00 committed by GitHub
commit c5fdd4392a
1 changed files with 3 additions and 1 deletions

View File

@ -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':