From 6044742ceea22f0d212a5915665b38a7498971ca Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Mon, 8 Dec 2014 23:41:52 -0800 Subject: [PATCH] Fix: Hue lights will not flash anymore on next turn on call after having flashed --- homeassistant/components/light/hue.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/homeassistant/components/light/hue.py b/homeassistant/components/light/hue.py index 2cede156381..bf8dae839c5 100644 --- a/homeassistant/components/light/hue.py +++ b/homeassistant/components/light/hue.py @@ -7,7 +7,8 @@ import homeassistant.util as util from homeassistant.helpers import ToggleDevice from homeassistant.const import ATTR_FRIENDLY_NAME, CONF_HOST from homeassistant.components.light import ( - ATTR_BRIGHTNESS, ATTR_XY_COLOR, ATTR_TRANSITION, ATTR_FLASH, FLASH_LONG) + ATTR_BRIGHTNESS, ATTR_XY_COLOR, ATTR_TRANSITION, + ATTR_FLASH, FLASH_LONG, FLASH_SHORT) MIN_TIME_BETWEEN_SCANS = timedelta(seconds=10) MIN_TIME_BETWEEN_FORCED_SCANS = timedelta(seconds=1) @@ -97,8 +98,12 @@ class HueLight(ToggleDevice): flash = kwargs.get(ATTR_FLASH) - if flash is not None: - command['alert'] = 'lselect' if flash == FLASH_LONG else 'select' + if flash == FLASH_LONG: + command['alert'] = 'lselect' + elif flash == FLASH_SHORT: + command['alert'] = 'select' + else: + command['alert'] = 'none' self.bridge.set_light(self.light_id, command)