From 7d0cc7e26c400da5b75805736cb22a8bac08ae96 Mon Sep 17 00:00:00 2001 From: Anders Melchiorsen Date: Sun, 15 Jul 2018 23:18:52 +0200 Subject: [PATCH] Fix flux_led turning on with color or effect (#15472) --- homeassistant/components/light/flux_led.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/homeassistant/components/light/flux_led.py b/homeassistant/components/light/flux_led.py index b9db9d4f99b..c5cd9a8c4fd 100644 --- a/homeassistant/components/light/flux_led.py +++ b/homeassistant/components/light/flux_led.py @@ -218,6 +218,9 @@ class FluxLight(Light): def turn_on(self, **kwargs): """Turn the specified or all lights on.""" + if not self.is_on: + self._bulb.turnOn() + hs_color = kwargs.get(ATTR_HS_COLOR) if hs_color: @@ -269,9 +272,6 @@ class FluxLight(Light): else: self._bulb.setRgb(*tuple(rgb), brightness=brightness) - if not self.is_on: - self._bulb.turnOn() - def turn_off(self, **kwargs): """Turn the specified or all lights off.""" self._bulb.turnOff()