Hi everyone,
I have a group of lights an want to turn them on one-by-one with an delay of a second:
alias: Treppenlicht_auf
description: ""
trigger:
- type: turned_on
platform: device
device_id: 9c208a4e400da6eaf1130ea4d080143a
entity_id: 5510139321e4a0347034c5367bc24e12
domain: binary_sensor
- type: turned_on
platform: device
device_id: 2ac981c5f7da6af0e4f9462deda7dc47
entity_id: 29b940a5cf00bb394f9afa880d66adff
domain: binary_sensor
condition: []
action:
- type: turn_on
device_id: c03832049754246119fe09162727fdd1
entity_id: 55e9c2d7301e000ab5017db3841d4d36
domain: light
- delay:
hours: 0
minutes: 0
seconds: 1
milliseconds: 0
- type: turn_on
device_id: 5762229f89a420ab03f5a1eae7a8f2b1
entity_id: e32ef13b8e34dcb7a70b5377f4243fae
domain: light
- delay:
hours: 0
minutes: 0
seconds: 1
milliseconds: 0
- type: turn_on
device_id: 8515ea3227fe6ed1f23ac02d027cf2c7
entity_id: 17558781fa63f05c9fdb0bc9ceb1ea38
domain: light
- delay:
hours: 0
minutes: 0
seconds: 1
milliseconds: 0
- type: turn_on
device_id: 7805245e7e7a2b790d67c77530bbdce0
entity_id: 9793ad7651b94cfd416e177d1561e08e
domain: light
- delay:
hours: 0
minutes: 0
seconds: 1
milliseconds: 0
- type: turn_on
device_id: 89e5899f5e2b75a9a079644a5e1f86f5
entity_id: 88cb3b51521c813e63fadae19671e941
domain: light
- delay:
hours: 0
minutes: 0
seconds: 10
milliseconds: 0
- service: light.turn_off
data: {}
target:
entity_id: light.treppenlichter
- service: python_script.set_state
data_template:
entity_id: binary_sensor.sensor_schaltaktor_2_1_fach_r_diele
state: "OFF"
mode: single
I also have all lights in a group (light.treppenlichter) but don’t know the best aproach to iterate trough them. Could anybody give an advice?