Hello, could somebody tell me what’s wrong in my code:
- id: '1602004200747'
alias: Evening-Morning switch lights
description: Turn ON lights at time if sun below horizon
trigger:
- platform: sun
event: sunset
offset: -00:45:00
- platform: time
at: 06:10:00
condition: []
action:
- service: switch.turn_on
entity_id:
- switch.bf4d1031e92d85215ciptn
- switch.bf1da4e7ab6a06a8c4cynz
- switch.bfd932f6f240f60ea3xrti
mode: single
#
- id: '1602004200748'
alias: Evening-Morning switch lights OFF
description: Turn OFF lights by time
trigger:
- platform: sun
event: sunrise
offset: +00:00:00
- platform: time
at: '08:30:00'
- platform: time
at: '20:45:00'
condition: []
action:
- service: switch.turn_off
entity_id:
- switch.bf4d1031e92d85215ciptn
- switch.bf1da4e7ab6a06a8c4cynz
- switch.bfd932f6f240f60ea3xrti
- switch.01005156bcddc26070bc_1
mode: single
The first part (sunset) works well, but second part doesn’t work with event - sunrise.