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": ... }
This commit is contained in:
Leonardo Brondani Schenkel 2018-07-01 12:32:48 +02:00 committed by Robert Svensson
parent c0229ebb77
commit 3c04b0756f

View file

@ -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: