#Need Help Automation: Lights on at sunset and off at specific time in ONE Automation
1 messages · Page 1 of 1 (latest)
Create the event. Create both triggers, ensuring you add a trigger ID to each one. Add each action (one ON, one OFF) using the correct Trigger ID for each action.
Thanks for your answers...
After searching some times i found something like that and hope it will work... 😉
`
trigger:
- platform: sun
event: sunset - platform: time
at: "23:15:00"
action: - service: switch.turn_{{ 'on' if trigger.platform == 'sun' else 'off' }}
entity_id: switch.XXX
mode: single
`