diff --git a/homeassistant/components/light/lifx/__init__.py b/homeassistant/components/light/lifx/__init__.py index 3bd53c425b9..68d36058f8f 100644 --- a/homeassistant/components/light/lifx/__init__.py +++ b/homeassistant/components/light/lifx/__init__.py @@ -34,7 +34,7 @@ from . import effects as lifx_effects _LOGGER = logging.getLogger(__name__) -REQUIREMENTS = ['aiolifx==0.4.7'] +REQUIREMENTS = ['aiolifx==0.4.8'] UDP_BROADCAST_PORT = 56700 @@ -46,6 +46,7 @@ CONF_SERVER = 'server' SERVICE_LIFX_SET_STATE = 'lifx_set_state' ATTR_HSBK = 'hsbk' +ATTR_INFRARED = 'infrared' ATTR_POWER = 'power' PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({ @@ -53,6 +54,7 @@ PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({ }) LIFX_SET_STATE_SCHEMA = LIGHT_TURN_ON_SCHEMA.extend({ + ATTR_INFRARED: vol.All(vol.Coerce(int), vol.Clamp(min=0, max=255)), ATTR_POWER: cv.boolean, }) @@ -363,6 +365,9 @@ class LIFXLight(Light): yield from lifx_effects.default_effect(self, **kwargs) return + if ATTR_INFRARED in kwargs: + self.device.set_infrared(convert_8_to_16(kwargs[ATTR_INFRARED])) + if ATTR_TRANSITION in kwargs: fade = int(kwargs[ATTR_TRANSITION] * 1000) else: diff --git a/homeassistant/components/light/lifx/services.yaml b/homeassistant/components/light/lifx/services.yaml index a907a665753..fb374f360d0 100644 --- a/homeassistant/components/light/lifx/services.yaml +++ b/homeassistant/components/light/lifx/services.yaml @@ -9,6 +9,10 @@ lifx_set_state: '...': description: All turn_on parameters can be used to specify a color + infrared: + description: Automatic infrared level (0..255) when light brightness is low + example: 255 + transition: description: Duration in seconds it takes to get to the final state example: 10 diff --git a/requirements_all.txt b/requirements_all.txt index d7ea44a5b5d..4e59a99b02c 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -49,7 +49,7 @@ aiodns==1.1.1 aiohttp_cors==0.5.3 # homeassistant.components.light.lifx -aiolifx==0.4.7 +aiolifx==0.4.8 # homeassistant.components.scene.hunterdouglas_powerview aiopvapi==1.4