deconz-rest-plugin: Transition (fading in/out of lights) stopped working in .76 in home assistant
Hello!
The transition feature is being ignored in .76. Works great in .75
Example from an automation in Home Assistant - it fades out over a time of 30 seconds (in .75) but just turns off in .76:
action:
- data:
entity_id:
- light.lampa_taket_kontoret
- light.lampa_ikea_rgb
- light.ledstrip_skrivbordet
- light.lampa_kontoret_bakom_monitorn
- light.takpanel_kontor
- light.lampa_kistan
- light.led_panel_jormlien
transition: 30
service: light.turn_off
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 2
- Comments: 16 (1 by maintainers)
Ok, with https://github.com/ebaauw/deconz-rest-plugin/commit/56b3624200bf0b0ac334e363786b5709a84914a7, the behaviour should be:
{"on": false}{"on": false, "transitiontime":t}(Note that t is ignored)
{"on": false, "bri":b}Off with Effect (0, 0)
{"on": false, "bri":b, "transitiontime":t}Note that b is ignored)
This is the same as the Hue bridge, except for
{"on": false, "transitiontime":t}, as per my remark above.Note that Off with Effect is sent only to Hue lights; Off is sent to other lights.
A PUT to a light
statewith a body of{"on": false, "bri": 0, "transitiontime": 300}now results in a Move to Level (0, 300), followed by an Off with Effect (0, 0), effectively cancelling the transition. I think it used to result in a Move to Level (with On/Off) (0, 300).The change was intentional, see https://github.com/dresden-elektronik/deconz-rest-plugin/issues/1111#issuecomment-456464872:
I don’t recall exactly what I was thinking back in January. Not all lights will actually turn off on Move to Level (with On/Off), so maybe that was my reasoning no longer to send Move to Level (with On/Off). But indeed, now it’s no longer possible to turn a light off slowly with one REST API call. I still think it’s a good idea to have changed the logic for
{"on": false, "transitiontime": 300}to Off with Effect (0, 0), but{"on": false, "bri": 0, "transitiontime": 300}should still result in a Move to Level (with On/Off) (0, 300).