Alright, lets try this.
For future reference if you’re copying from a .yaml
, select the text and use the preformatted text button (</>), that keeps the indentation.
Your pause automation should be fine, the resume one will have to be adjusted so it doesn’t inadvertently resume both controllers if the second one is waiting for the first to finish. Something like that should work. My other thought I had after doing all this was that using the schedules as an indicator of which controller is running works fine if you only have 1 separate schedule on each controller that you plan to use regularly. Maybe at some point down the road I’ll look into creating a binary sensor that shows if each controller is running or not to make it more straight forward.
Sorry this got kinda long winded. Let me know if you have questions.
alias: Rachio Pause
trigger:
- platform: state
entity_id: switch.<controller_2_schedule>
from: 'off'
to: 'on'
condition:
- condition: state
entity_id: switch.<controller_1_schedule>
state: 'on'
action:
- service: rachio.pause_watering
data:
devices: "<controller_2>"
- repeat:
while:
- condition: state
entity_id: switch.<controller_1_schedule>
state: 'on'
sequence:
- wait_template: "{{is_state('switch.<controller_1_schedule>','off')}}"
# Wait just under the 1 hour and if the other controller is still running, re-start the pause.
timeout: '59:00:00'
- choose:
- conditions:
- condition: template
value_template: "{{not wait.completed}}"
sequence:
- service: rachio.resume_watering
data:
devices: "<controller_2>"
- delay:
seconds: 2
- service: rachio.pause_watering
data:
devices: "<controller_2>"
default:
- service: rachio.resume_watering
data:
devices: "<controller_2>"
id: ‘1601090036962’
alias: Rachio Resume
description: Resume Watering
trigger:
- above: ‘55’
entity_id: sensor.water_pressure
platform: numeric_state
condition: []
action:
- data_template:
devices: "{% if is_state('switch.<controller_1_schedule>','on') %} '<controller_1>' {%else%} '<controller_2>'{%endif%}"
service: rachio.resume_watering
mode: single