From 3c04b0756f5fb91ff54a9a88297fdb141d9b87ca Mon Sep 17 00:00:00 2001 From: Leonardo Brondani Schenkel Date: Sun, 1 Jul 2018 12:32:48 +0200 Subject: [PATCH] deconz: proper fix light.turn_off with transition (#15227) Previous commit d4f7dfa successfully fixed the bug in which lights would not turn off if a transition was specified, however if 'bri' is not present in the payload of the PUT request set to deCONZ, then any 'transitiontime' ends up being ignored. This commit addresses the unintended side effect by reintroducing 'bri', resulting in the following payload: { "on": false, "bri": 0, "transitiontime": ... } --- homeassistant/components/light/deconz.py | 1 + 1 file changed, 1 insertion(+) diff --git a/homeassistant/components/light/deconz.py b/homeassistant/components/light/deconz.py index d6078490e7f..08d7f5773f7 100644 --- a/homeassistant/components/light/deconz.py +++ b/homeassistant/components/light/deconz.py @@ -174,6 +174,7 @@ 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: