Merge pull request #4450 from home-assistant/flux_led_lib_09

Upgrade flux led lib
This commit is contained in:
Daniel Høyer Iversen 2016-11-18 14:18:12 +01:00 committed by GitHub
commit 36b338051b
2 changed files with 6 additions and 6 deletions

View File

@ -17,8 +17,8 @@ from homeassistant.components.light import (
PLATFORM_SCHEMA) PLATFORM_SCHEMA)
import homeassistant.helpers.config_validation as cv import homeassistant.helpers.config_validation as cv
REQUIREMENTS = ['https://github.com/Danielhiversen/flux_led/archive/0.8.zip' REQUIREMENTS = ['https://github.com/Danielhiversen/flux_led/archive/0.9.zip'
'#flux_led==0.8'] '#flux_led==0.9']
_LOGGER = logging.getLogger(__name__) _LOGGER = logging.getLogger(__name__)
@ -135,11 +135,11 @@ class FluxLight(Light):
rgb = kwargs.get(ATTR_RGB_COLOR) rgb = kwargs.get(ATTR_RGB_COLOR)
brightness = kwargs.get(ATTR_BRIGHTNESS) brightness = kwargs.get(ATTR_BRIGHTNESS)
effect = kwargs.get(ATTR_EFFECT) effect = kwargs.get(ATTR_EFFECT)
if rgb and brightness: if rgb is not None and brightness is not None:
self._bulb.setRgb(*tuple(rgb), brightness=brightness) self._bulb.setRgb(*tuple(rgb), brightness=brightness)
elif rgb: elif rgb is not None:
self._bulb.setRgb(*tuple(rgb)) self._bulb.setRgb(*tuple(rgb))
elif brightness: elif brightness is not None:
if self._mode == 'rgbw': if self._mode == 'rgbw':
self._bulb.setWarmWhite255(brightness) self._bulb.setWarmWhite255(brightness)
elif self._mode == 'rgb': elif self._mode == 'rgb':

View File

@ -152,7 +152,7 @@ hikvision==0.4
# http://github.com/adafruit/Adafruit_Python_DHT/archive/310c59b0293354d07d94375f1365f7b9b9110c7d.zip#Adafruit_DHT==1.3.0 # http://github.com/adafruit/Adafruit_Python_DHT/archive/310c59b0293354d07d94375f1365f7b9b9110c7d.zip#Adafruit_DHT==1.3.0
# homeassistant.components.light.flux_led # homeassistant.components.light.flux_led
https://github.com/Danielhiversen/flux_led/archive/0.8.zip#flux_led==0.8 https://github.com/Danielhiversen/flux_led/archive/0.9.zip#flux_led==0.9
# homeassistant.components.switch.tplink # homeassistant.components.switch.tplink
https://github.com/GadgetReactor/pyHS100/archive/1f771b7d8090a91c6a58931532e42730b021cbde.zip#pyHS100==0.2.0 https://github.com/GadgetReactor/pyHS100/archive/1f771b7d8090a91c6a58931532e42730b021cbde.zip#pyHS100==0.2.0