I used to have a rainbird irrigation controller but now I switched to a DIY relay switch.
My code was as follows before:
irrig_front_yard:
friendly_name: "Front yard"
value_template: "{{ is_state('sprinkler_zone_2', 'on') }}"
turn_on:
service: rainbird.start_irrigation
data_template:
entity_id: switch.sprinkler_zone_2
duration: "{{ states('input_number.irrigation_frontyardduration') | int }}"
turn_off:
service: switch.turn_off
data:
entity_id: switch.sprinkler_zone_2
but now it is the following but it doesn’t work (changed service: rainbird.start_irrigation to service: switch.turn_on):
irrig_front_yard:
friendly_name: "Front yard"
value_template: "{{ is_state('sprinkler_zone_2', 'on') }}"
turn_on:
service: switch.turn_on
data_template:
entity_id: switch.sprinkler_zone_2
duration: "{{ states('input_number.irrigation_frontyardduration') | int }}"
turn_off:
service: switch.turn_off
data:
entity_id: switch.sprinkler_zone_2
I get this error:
I want the irrigation switch to be on until the time reaches the slider defined time.