My well pump is set to work on specific schedules, but I want to add an hourly turn-on, then runs for 20 seconds and turns off every hour. BUT only when the specific schedules are not running, in other words, when it is off.
I got to the code below, but I don’t know to add a wait for 20 seconds between on and off.
Any input?
Thank you guys!
Thanks @TinyDoT.
I managed to get an error free automation (see below), but it is not running every hour. actually only runs if I order it to do so. Any suggestion?
- id: "WellHourly"
alias: Well on every hour
trigger:
- platform: time_pattern
hours: '1'
condition:
- condition: state
state: "off"
entity_id: switch.well
for:
minutes: 30
action:
- service: switch.turn_on
entity_id: switch.well
- delay: "00:00:20"
- service: switch.turn_off
entity_id: switch.well