tomkil
(Tommy)
August 27, 2017, 10:23am
1
Hi
I can not get a delay for 2 lights to work
Any help would be great
id: normal_lys_av
alias: Normal lys av
trigger:
platform: time
at: ‘23:00:00’
condition:
condition: state
entity_id: input_select.hus_modus
state: “Normal”
action:
service: light.turn_off
entity_id:
#- light.kjkkenlys_163
#- light.trapplysz_223
light.spisestue_hovedlys_35
light.spisestue_taklys_29
light.stue_lys_sofa_17
light.stue_lys_gostol_15
light.ovnlys_63
light.stalampe_65
light.vegglampe_67
delay: ‘00:03:00’
service: light.turn_off
entity_id: light.trapplysz_223
entity_id: light.kjkkenlys_163
keithh666
(Keith Hull)
August 27, 2017, 4:10pm
2
You need to format the code properly using </> after selecting the code in the edit box - having said that the delay command looks fine so I would say it’s the way you have listed the lights, for a list put - before the lights like you have above or put the service command before each one basically either do one or the other not both
tomkil
(Tommy)
August 27, 2017, 6:19pm
3
Tried like this, but still shuts of right away
- id: normal_lys_av
alias: Normal lys av
trigger:
platform: time
at: '23:00:00'
condition:
- condition: state
entity_id: input_select.hus_modus
state: "Normal"
action:
- service: light.turn_off
entity_id:
#- light.kjkkenlys_163
#- light.trapplysz_223
- light.spisestue_hovedlys_35
- light.spisestue_taklys_29
- light.stue_lys_sofa_17
- light.stue_lys_gostol_15
- light.ovnlys_63
- light.stalampe_65
- light.vegglampe_67
- delay: '00:03:00'
- service: light.turn_off
- entity_id: light.trapplysz_223
- entity_id: light.kjkkenlys_163
keithh666
(Keith Hull)
August 27, 2017, 10:59pm
5
Well you haven’t changed anything
Look at the format above its like this …
- service: light.turn_off
entity_id:
- light.spisestue_hovedlys_35
- light.spisestue_taklys_29
you have it like this .....
- service: light.turn_off
- entity_id: light.trapplysz_223
- entity_id: light.kjkkenlys_163
treno
(travis reno)
August 27, 2017, 11:57pm
6
I can’t reproduce your problem, but the automation, as you have it listed won’t work. It generates a duplicate ID error when you try to run it.
Try it like this:
- id: normal_lys_av
alias: Normal lys av
trigger:
platform: time
at: '23:00:00'
condition:
- condition: state
entity_id: input_select.hus_modus
state: "Normal"
action:
- service: switch.turn_off
entity_id:
switch.sun
- delay: '00:01:00'
- service: switch.turn_off
entity_id: switch.office2
entity_id: switch.office1
- id: normal_lys_av
alias: Normal lys av
trigger:
platform: time
at: '23:00:00'
condition:
- condition: state
entity_id: input_select.hus_modus
state: "Normal"
action:
- service: light.turn_off
entity_id:
#- light.kjkkenlys_163
#- light.trapplysz_223
- light.spisestue_hovedlys_35
- light.spisestue_taklys_29
- light.stue_lys_sofa_17
- light.stue_lys_gostol_15
- light.ovnlys_63
- light.stalampe_65
- light.vegglampe_67
- delay: '00:03:00'
- service: light.turn_off
entity_id:
- light.trapplysz_223
- light.kjkkenlys_163
tomkil
(Tommy)
August 29, 2017, 7:48pm
7
Of course, so easy, but still hopeless to see
Thanks a lot.
Tommy