From 10d1e81f10f061df995c3f4bdde3386069791e91 Mon Sep 17 00:00:00 2001 From: Leonardo Brondani Schenkel Date: Sat, 30 Jun 2018 00:59:10 +0200 Subject: [PATCH] deconz: fix light.turn_off with transition (#15222) When light.turn_off is invoked with a transition, the following payload was sent to deCONZ via PUT to /light/N/state: { "bri": 0, "transitiontime": transition } However, on recent versions of deCONZ (latest is 2.05.31 at the time of writing) this does not turn off the light, just sets it to minimum brightness level (brightness is clamped to minimum level the light supports without turning it off). This commit makes the code send this payload instead: { "on": false, "transitiontime": transition } This works as intended and the light does transition to the 'off' state. This change was tested with Philips Hue colored lights, IKEA colored lights and IKEA white spectrum lights: they were all able to be turned off successfully with the new payload, and none of them could be turned off with the old payload. --- homeassistant/components/light/deconz.py | 1 - 1 file changed, 1 deletion(-) diff --git a/homeassistant/components/light/deconz.py b/homeassistant/components/light/deconz.py index 05907ea86ee..d6078490e7f 100644 --- a/homeassistant/components/light/deconz.py +++ b/homeassistant/components/light/deconz.py @@ -174,7 +174,6 @@ class DeconzLight(Light): data = {'on': False} if ATTR_TRANSITION in kwargs: - data = {'bri': 0} data['transitiontime'] = int(kwargs[ATTR_TRANSITION]) * 10 if ATTR_FLASH in kwargs: