I’d like to understand how to write an automation that can reliably turn off multiple lights.
I had scheduled a script to run a light show after turning off the lights temporarily on new years eve. Unfortunately, in spite of testing this in advance, the “turn off the lights” part failed me at show time.
In particular, I have a service call below which ended up only turning off one light:
service: light.turn_off
data: {}
target:
entity_id:
- light.kitchen_and_family_recessed_lights
- light.dimmer_dry_contact_relay_19
- light.living_room_recessed_lights
- light.dimmer_dry_contact_relay_2
- light.dimmer_dry_contact_relay_3
The trace timeline simply shows
...
Light: Turn off Kitchen and Family Recessed Lights, Dining ceiling, Living Room Recessed Lights, Laundry Hallway Dimmer, Sink Light
(light.dimmer_dry_contact_relay_2) turned off
9 seconds later
...
Here’s the full downloaded trace: { "trace": { "last_step": "sequence/9", "run_id": "91f8a33248117183 - Pastebin.com