light.blinkt: update brightness control logic (#7389)
Always use the current brightness, as per discussion at https://github.com/home-assistant/home-assistant/pull/7377#discussion_r114102005pull/7409/head
parent
a4f1f6e724
commit
12c8266942
|
@ -96,12 +96,12 @@ class BlinktLight(Light):
|
|||
|
||||
def turn_on(self, **kwargs):
|
||||
"""Instruct the light to turn on and set correct brightness & color."""
|
||||
self._brightness = kwargs.get(ATTR_BRIGHTNESS, 255)
|
||||
percent_bright = (self._brightness / 255)
|
||||
|
||||
if ATTR_RGB_COLOR in kwargs:
|
||||
self._rgb_color = kwargs[ATTR_RGB_COLOR]
|
||||
if ATTR_BRIGHTNESS in kwargs:
|
||||
self._brightness = kwargs[ATTR_BRIGHTNESS]
|
||||
|
||||
percent_bright = (self._brightness / 255)
|
||||
self._blinkt.set_all(self._rgb_color[0],
|
||||
self._rgb_color[1],
|
||||
self._rgb_color[2],
|
||||
|
|
Loading…
Reference in New Issue