I am in the process of porting over some of my custom environment to Home Assistant and I have run into a pretty weird snag. On my original set up I could send a single command via set_zone_colors() and simultaneously set all the zones to begin transitioning to their different colors, hues, and brightness levels.
I’m still pretty new to YAML so I may be missing something obvious but take this script as the example:
sunrise:
alias: Sunrise
sequence:
- service: scene.turn_on
data:
transition: 15
target:
entity_id: scene.sunrise
- service: lifx.set_state
data:
zones:
- 0
- 1
- 14
- 15
hs_color:
- 36
- 100
brightness: 5
transition: 15
target:
entity_id: light.window_sunshine
- service: lifx.set_state
data:
zones:
- 4
- 6
- 9
- 11
hs_color:
- 275
- 36
brightness: 5
transition: 15
target:
entity_id: light.window_sunshine
- service: lifx.set_state
data:
zones:
- 2
- 3
- 5
- 7
- 8
- 10
- 12
- 13
color_name: yellow
brightness: 0
transition: 15
target:
entity_id: light.window_sunshine
- delay:
hours: 0
minutes: 0
seconds: 15
milliseconds: 0
mode: restart
icon: mdi:weather-sunset-up
This does not work as intended and only the final transition fires. It took me ages to work out what was going on but it would appear each of these is issuing their own command to the light strip. This is causing each successive command to override the previous and therefore not complete their transitions. Whereas if they are all gathered together in a single payload they would behave as expected.
How can I fire these all off at once in a single command/payload so they all transition together?
Also - how can I execute this with a scene rather than a script?