Skip to content

Commit

Permalink
Update flux_led.py (#9122)
Browse files Browse the repository at this point in the history
  • Loading branch information
Danielhiversen committed Aug 24, 2017
1 parent 698d133 commit d72a181
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions homeassistant/components/light/flux_led.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -216,9 +216,9 @@ def turn_on(self, **kwargs):
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:
Expand Down

0 comments on commit d72a181

Please sign in to comment.