diff --git a/homeassistant/components/homematic/__init__.py b/homeassistant/components/homematic/__init__.py index 97c805aa2ac..747b23bb970 100644 --- a/homeassistant/components/homematic/__init__.py +++ b/homeassistant/components/homematic/__init__.py @@ -123,7 +123,8 @@ HM_ATTRIBUTE_SUPPORT = { 'CURRENT': ['current', {}], 'VOLTAGE': ['voltage', {}], 'OPERATING_VOLTAGE': ['voltage', {}], - 'WORKING': ['working', {0: 'No', 1: 'Yes'}] + 'WORKING': ['working', {0: 'No', 1: 'Yes'}], + 'STATE_UNCERTAIN': ['state_uncertain', {}] } HM_PRESS_EVENTS = [ diff --git a/homeassistant/components/homematic/light.py b/homeassistant/components/homematic/light.py index 72aa9a977d4..f9bc785d3f4 100644 --- a/homeassistant/components/homematic/light.py +++ b/homeassistant/components/homematic/light.py @@ -2,8 +2,8 @@ import logging from homeassistant.components.light import ( - ATTR_BRIGHTNESS, ATTR_EFFECT, ATTR_HS_COLOR, SUPPORT_BRIGHTNESS, - SUPPORT_COLOR, SUPPORT_EFFECT, Light) + ATTR_BRIGHTNESS, ATTR_EFFECT, ATTR_HS_COLOR, ATTR_TRANSITION, + SUPPORT_BRIGHTNESS, SUPPORT_COLOR, SUPPORT_EFFECT, Light) from . import ATTR_DISCOVER_DEVICES, HMDevice @@ -75,6 +75,9 @@ class HMLight(HMDevice, Light): def turn_on(self, **kwargs): """Turn the light on and/or change color or color effect settings.""" + if ATTR_TRANSITION in kwargs: + self._hmdevice.setValue('RAMP_TIME', kwargs[ATTR_TRANSITION]) + if ATTR_BRIGHTNESS in kwargs and self._state == "LEVEL": percent_bright = float(kwargs[ATTR_BRIGHTNESS]) / 255 self._hmdevice.set_level(percent_bright, self._channel)