Hey all, trying to create a simple timer mechanism to control a drip system thats easily controllable/adjusttable through the UI
Automation 1) - an Input number updates a timer and starts the timer. - working
Automation 2) - monitors input_number, when greater than 0, start the switch, Wait for a template to evaluate to true, where it waits for the timer from automation 1 to go back to idle, then turn off switch.
However, I havent had any luck, im wondering if maybe “wait for template to be true” doesnt quite work in this case, im trying to use it as a Delay basically, but it made sense to me to have it use the timer state since I might manually stop the timer which forces the timers state back to “idle”.
Automation 1 (Working):
alias: "Timer: Garden Bed Input Number Automation"
description: ""
trigger:
- platform: state
entity_id:
- input_number.gardenbed_off_timer
condition: []
action:
- service: timer.start
target:
entity_id: timer.garden_bed
data:
duration: "{{ trigger.to_state.state | int(0) * 60 }}"
mode: single
Automation 2 (Not working)
alias: Garden Bed Drip
description: ""
trigger:
- platform: state
entity_id:
- input_number.gardenbed_off_timer
condition:
- condition: template
value_template: "{{ states('input_number.gardenbed_off_timer') | int > 0}}"
action:
- service: switch.turn_on
metadata: {}
data: {}
target:
entity_id: switch.wyze_outdoor_relay1
- wait_template: |
{{ is_state('timer.garden_bed', 'Idle') }}
continue_on_timeout: true
- service: switch.turn_off
metadata: {}
data: {}
target:
entity_id: switch.wyze_outdoor_relay1
mode: restart
any help is appreciated, works great at the UI, i just slide the slider to what I want, i get a nice countdown to see how much time is remaining and its easy to control, except that it just wont stop the switch!