From 0a78b69ee206b827db64d59041cc9f02788bd4d3 Mon Sep 17 00:00:00 2001 From: Daniel <Daniel.H.Iversen@ntnu.no> Date: Fri, 12 Aug 2016 15:21:51 +0200 Subject: [PATCH] Fix minor bug in flux led --- homeassistant/components/light/flux_led.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/light/flux_led.py b/homeassistant/components/light/flux_led.py index 58d229b20e9..ed696b0654e 100644 --- a/homeassistant/components/light/flux_led.py +++ b/homeassistant/components/light/flux_led.py @@ -112,14 +112,15 @@ class FluxLight(Light): def turn_on(self, **kwargs): """Turn the specified or all lights on.""" + if not self.is_on: + self._bulb.turnOn() + rgb = kwargs.get(ATTR_RGB_COLOR) brightness = kwargs.get(ATTR_BRIGHTNESS) if rgb: self._bulb.setRgb(*tuple(rgb)) elif brightness: self._bulb.setWarmWhite255(brightness) - else: - self._bulb.turnOn() def turn_off(self, **kwargs): """Turn the specified or all lights off."""