Try this:
alias: IU Start Bewässerung
sequence:
- choose:
- conditions:
- condition: and
conditions:
- condition: state
entity_id: binary_sensor.irrigation_unlimited_c1_m
state: 'off'
- condition: state
entity_id: binary_sensor.irrigation_unlimited_c2_m
state: 'off'
sequence:
- choose:
- conditions:
- condition: template
value_template: >-
{{ state_attr('binary_sensor.irrigation_unlimited_c1_z1',
'enabled') == True }}
sequence:
- service: irrigation_unlimited.manual_run
data_template:
entity_id: binary_sensor.irrigation_unlimited_c1_z1
time: >-
{{
((states("input_number.iu_zone_1_run_time")
| float * 60.0) | int) | timestamp_custom("%H:%M",
False) }}
- wait_for_trigger:
- platform: state
entity_id: binary_sensor.irrigation_unlimited_c1_z1
from: 'on'
to: 'off'
default: []
- choose:
- conditions:
- condition: template
value_template: >-
{{ state_attr('binary_sensor.irrigation_unlimited_c1_z2',
'enabled') == True }}
sequence:
- service: irrigation_unlimited.manual_run
data_template:
entity_id: binary_sensor.irrigation_unlimited_c1_z2
time: >-
{{
((states("input_number.iu_zone_2_run_time")
| float * 60.0) | int) | timestamp_custom("%H:%M",
False) }}
- wait_for_trigger:
- platform: state
entity_id: binary_sensor.irrigation_unlimited_c1_z2
from: 'on'
to: 'off'
default: []
- choose:
- conditions:
- condition: template
value_template: >-
{{ state_attr('binary_sensor.irrigation_unlimited_c1_z3',
'enabled') == True }}
sequence:
- service: irrigation_unlimited.manual_run
data_template:
entity_id: binary_sensor.irrigation_unlimited_c1_z3
time: >-
{{
((states("input_number.iu_zone_3_run_time")
| float * 60.0) | int) | timestamp_custom("%H:%M",
False) }}
- wait_for_trigger:
- platform: state
entity_id: binary_sensor.irrigation_unlimited_c1_z3
from: 'on'
to: 'off'
default: []
- choose:
- conditions:
- condition: template
value_template: >-
{{ state_attr('binary_sensor.irrigation_unlimited_c1_z4',
'enabled') == True }}
sequence:
- service: irrigation_unlimited.manual_run
data_template:
entity_id: binary_sensor.irrigation_unlimited_c1_z4
time: >-
{{
((states("input_number.iu_zone_4_run_time")
| float * 60.0) | int) | timestamp_custom("%H:%M",
False) }}
- wait_for_trigger:
- platform: state
entity_id: binary_sensor.irrigation_unlimited_c1_z4
from: 'on'
to: 'off'
default: []
- choose:
- conditions:
- condition: template
value_template: >-
{{ state_attr('binary_sensor.irrigation_unlimited_c2_z1',
'enabled') == True }}
sequence:
- service: irrigation_unlimited.manual_run
data_template:
entity_id: binary_sensor.irrigation_unlimited_c2_z1
time: >-
{{
((states("input_number.iu_zone_5_run_time")
| float * 60.0) | int) | timestamp_custom("%H:%M",
False) }}
- wait_for_trigger:
- platform: state
entity_id: binary_sensor.irrigation_unlimited_c2_z1
from: 'on'
to: 'off'
default: []
- choose:
- conditions:
- condition: template
value_template: >-
{{ state_attr('binary_sensor.irrigation_unlimited_c2_z2',
'enabled') == True }}
sequence:
- service: irrigation_unlimited.manual_run
data_template:
entity_id: binary_sensor.irrigation_unlimited_c2_z2
time: >-
{{
((states("input_number.iu_zone_6_run_time")
| float * 60.0) | int) | timestamp_custom("%H:%M",
False) }}
- wait_for_trigger:
- platform: state
entity_id: binary_sensor.irrigation_unlimited_c2_z2
from: 'on'
to: 'off'
default: []
- choose:
- conditions:
- condition: template
value_template: >-
{{ state_attr('binary_sensor.irrigation_unlimited_c2_z3',
'enabled') == True }}
sequence:
- service: irrigation_unlimited.manual_run
data_template:
entity_id: binary_sensor.irrigation_unlimited_c2_z3
time: >-
{{
((states("input_number.iu_zone_7_run_time")
| float * 60.0) | int) | timestamp_custom("%H:%M",
False) }}
- wait_for_trigger:
- platform: state
entity_id: binary_sensor.irrigation_unlimited_c2_z3
from: 'on'
to: 'off'
default: []
- choose:
- conditions:
- condition: template
value_template: >-
{{ state_attr('binary_sensor.irrigation_unlimited_c2_z4',
'enabled') == True }}
sequence:
- service: irrigation_unlimited.manual_run
data_template:
entity_id: binary_sensor.irrigation_unlimited_c2_z4
time: >-
{{
((states("input_number.iu_zone_8_run_time")
| float * 60.0) | int) | timestamp_custom("%H:%M",
False) }}
- wait_for_trigger:
- platform: state
entity_id: binary_sensor.irrigation_unlimited_c2_z4
from: 'on'
to: 'off'
default: []
- choose:
- conditions:
- condition: template
value_template: >-
{{ state_attr('binary_sensor.irrigation_unlimited_c2_z5',
'enabled') == True }}
sequence:
- service: irrigation_unlimited.manual_run
data_template:
entity_id: binary_sensor.irrigation_unlimited_c2_z5
time: >-
{{
((states("input_number.iu_zone_9_run_time")
| float * 60.0) | int) | timestamp_custom("%H:%M",
False) }}
- wait_for_trigger:
- platform: state
entity_id: binary_sensor.irrigation_unlimited_c2_z5
from: 'on'
to: 'off'
default: []
- conditions:
- condition: state
entity_id: binary_sensor.irrigation_unlimited_c1_m
state: 'on'
sequence:
- service: irrigation_unlimited.cancel
data:
entity_id: binary_sensor.irrigation_unlimited_c1_m
- conditions:
- condition: state
entity_id: binary_sensor.irrigation_unlimited_c2_m
state: 'on'
sequence:
- service: irrigation_unlimited.cancel
data:
entity_id: binary_sensor.irrigation_unlimited_c2_m
default: []
mode: restart
icon: 'mdi:sprinkler'