Capn_jimbo
(PRANITH PERERA)
April 5, 2019, 9:07pm
1
hi all,
i am trying to add a delay to my automation. currently it is triggered by a switch and all three lights turn on.
I want to add a delay of 2 seconds beteen each light.
how would i go about it.
- alias: "all living room lights max"
initial_state: 'on'
trigger:
platform: event
event_type: deconz_event
event_data:
id: switch_2
event: 2004
action:
service: scene.turn_on
entity_id:
- scene.living_right_max
- scene.living_left_max
- scene.living_paper_lamp_max
thank you in advance …
silvrr
April 5, 2019, 9:13pm
2
Capn_jimbo
(PRANITH PERERA)
April 5, 2019, 9:27pm
3
thank you, but i am unable to figure out still on how to add the 2 second delay between my 3 light scenes.
I added service and entity id for each scene and delay in between but didn’t work…
silvrr
April 5, 2019, 9:46pm
4
Any errors in the log?
Did you restart or reload your automations after making the change?
Make sure you reload the automations. You can define hours, minutes, or seconds as well.
action:
service: scene.turn_on
entity_id:
- scene.living_right_max
- delay:
seconds: 2
- scene.living_left_max
- delay:
seconds: 2
- scene.living_paper_lamp_max
Capn_jimbo
(PRANITH PERERA)
April 6, 2019, 7:30am
6
appreciate the help, but after adjusting the automation like the following
- alias: "all living room lights max"
initial_state: 'on'
trigger:
platform: event
event_type: deconz_event
event_data:
id: switch_2
event: 2004
action:
service: scene.turn_on
entity_id:
- scene.living_right_max
- delay:
seconds: 2
- scene.living_left_max
- delay:
seconds: 2
- scene.living_paper_lamp_max
the check config gave following error
Invalid config for [automation]: not a valid value for dictionary value @ data[‘action’][0][‘entity_id’]. Got None. (See /config/configuration.yaml, line 180). Please check the docs at https://home-assistant.io/components/automation/
but when i delete the delay, the automation and all three lights works as in the scene…
any thoughts ?
Timx
(Timo)
April 6, 2019, 10:58am
7
I got it like this
- service: light.turn_on
entity_id: group.kitchen
- delay: 00:03:00
- service: light.turn_off
entity_id: light.domitech
petro
(Petro)
April 6, 2019, 11:04am
8
you can’t put delays in the entity_id section. Each entity id needs to have it’s own service with delays between each
- alias: "all living room lights max"
initial_state: 'on'
trigger:
platform: event
event_type: deconz_event
event_data:
id: switch_2
event: 2004
action:
- service: scene.turn_on
entity_id: scene.living_right_max
- delay:
seconds: 2
- service: scene.turn_on
entity_id: scene.living_left_max
- delay:
seconds: 2
- service: scene.turn_on
entity_id: scene.living_paper_lamp_max
``
4 Likes
Capn_jimbo
(PRANITH PERERA)
April 6, 2019, 12:45pm
9
Thanks so much … working with no errors …