Update light.py (#26703)

Fix for esphome lights to use the flash feature
pull/26510/head^2
CQoute 2019-09-22 08:59:52 +09:30 committed by Fabian Affolter
parent dc52b858a4
commit 544cdae67c
1 changed files with 1 additions and 1 deletions

View File

@ -74,7 +74,7 @@ class EsphomeLight(EsphomeEntity, Light):
red, green, blue = color_util.color_hsv_to_RGB(hue, sat, 100)
data["rgb"] = (red / 255, green / 255, blue / 255)
if ATTR_FLASH in kwargs:
data["flash"] = FLASH_LENGTHS[kwargs[ATTR_FLASH]]
data["flash_length"] = FLASH_LENGTHS[kwargs[ATTR_FLASH]]
if ATTR_TRANSITION in kwargs:
data["transition_length"] = kwargs[ATTR_TRANSITION]
if ATTR_BRIGHTNESS in kwargs: