I'm trying to replicate the syntax as documented here:
https://www.home-assistant.io/docs/scripts#for-each
Here is my script:
demo_for_each_loop: mode: restart sequence: - alias: use a for each loop repeat: for_each: - "lounge_lights" - "kitchen_lights" sequence: - service: light.turn_off target: entity_id: "light.{{ repeat.item }}"
But I am getting "Expected object" error on the "lounge_lights" line.
What am I missing? I'm new to these scripts but I've been looking at it for hours and can't see what's wrong. I hope someone else can see it.