Hello everyone,
I’ve searched for some time how to simply turn switches on and off based on a time schedule or delay.
It is especially hard when the config check reports no issue! It must be simple but I don’t know where to look anymore
I can pinpoint the issue to the second part with the delay, but I’m really out of ideas.
automation:
- alias: 'Water Heater Schedule'
trigger:
platform: time
after: '04:00:00'
action:
service: switch.turn_on
entity_id: switch.water_heater
- alias 'Water Heater Schedule Off'
trigger:
platform: state
entity_id: switch.water_heater
to: 'on'
action:
delay: '02:00:00'
service: switch.turn_off
entity_id: switch.water_heater
The syntax is correct and copied from other examples.
Thanks for the help!