From d72a181e306301ff7da8ff57e65a72766b426e60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20H=C3=B8yer=20Iversen?= Date: Thu, 24 Aug 2017 23:31:57 +0200 Subject: [PATCH] Update flux_led.py (#9122) --- 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 21012f81658..209c3ab7724 100644 --- a/homeassistant/components/light/flux_led.py +++ b/homeassistant/components/light/flux_led.py @@ -122,7 +122,7 @@ def setup_platform(hass, config, add_devices, discovery_info=None): if ipaddr in light_ips: continue device['name'] = '{} {}'.format(device['id'], ipaddr) - device[ATTR_MODE] = 'rgbw' + device[ATTR_MODE] = MODE_RGBW device[CONF_PROTOCOL] = None light = FluxLight(device) lights.append(light) @@ -216,9 +216,9 @@ class FluxLight(Light): elif rgb is not None: self._bulb.setRgb(*tuple(rgb)) elif brightness is not None: - if self._mode == 'rgbw': + if self._mode == MODE_RGBW: self._bulb.setWarmWhite255(brightness) - elif self._mode == 'rgb': + elif self._mode == MODE_RGB: (red, green, blue) = self._bulb.getRgb() self._bulb.setRgb(red, green, blue, brightness=brightness) elif effect == EFFECT_RANDOM: