How do I control my lawn irrigation using irrigation unlimited integration

Dear community,

I was rather proficient in openhab but I’m quite new to home assistant.
Maybe to help you understand what I I’m trying to achieve I’m will quickly explain how it worked in openhab. I do have a hunter irrigation control. I have three zones for drip irrigation and three zones for lawn irrigation. Drip irrigation can work 3 areas at the same time for lawn irrigation I have to run them separately so for lawn irrigation I will be able to start the lawn irrigation. I could also set the time from 5 to 30 minutes. Once the switch is actuated it will go for 10 minutes zone one then 10 minutes zone 2 and finally 10 minutes zone 3 and stop in the end. Also I was able to automatically start the lawn irrigation at sunrise. Once the irrigation started it would show me a timer displaying how much time is remaining for each zone and which zone is currently irrigating.
For drip irrigation it was much easier I could just set a time and then it would start all three circles simultaneously. It is controlled via NodeMCU and MQTT.

Now with home assistant it seems to be so much harder let me explain how far i got until now.
I’ve successfully added MQTT and I can control them via Lovelace using each switch.

This is how my config.yaml looks like:

#mqtt
switch:
- platform: mqtt
  unique_id: Rasenbewässerung Hochbeet Nord
  name: "Rasenbewässerung Hochbeet Nord"
  state_topic: mqtt/irrigation/relay1/state
  command_topic: mqtt/irrigation/relay1/switch
  payload_on: "1"
  payload_off: "0"
  state_on: "ON"
  state_off: "OFF"
- platform: mqtt
  unique_id: Tropfbewässerung Terrasse
  state_topic: mqtt/irrigation/relay2/state
  command_topic: mqtt/irrigation/relay2/switch
  payload_on: "1"
  payload_off: "0"
  state_on: "ON"
  state_off: "OFF"
  name: "Tropfbewässerung Terrasse"
- platform: mqtt
  unique_id: Tropfbewässerung Haus
  state_topic: mqtt/irrigation/relay3/state
  command_topic: mqtt/irrigation/relay3/switch
  payload_on: "1"
  payload_off: "0"
  state_on: "ON"
  state_off: "OFF"
  name: "Tropfbewässerung Haus"
- platform: mqtt
  unique_id: Tropfbewässerung Hochbeet
  state_topic: mqtt/irrigation/relay4/state
  command_topic: mqtt/irrigation/relay4/switch
  payload_on: "1"
  payload_off: "0"
  state_on: "ON"
  state_off: "OFF"
  name: "Tropfbewässerung Hochbeet"
- platform: mqtt
  unique_id: Rasenbewässerung Terrasse
  state_topic: mqtt/irrigation/relay5/state
  command_topic: mqtt/irrigation/relay5/switch
  payload_on: "1"
  payload_off: "0"
  state_on: "ON"
  state_off: "OFF"
  name: "Rasenbewässerung Terrasse"
- platform: mqtt
  unique_id: Dummy Switch 6
  state_topic: mqtt/irrigation/relay6/state
  command_topic: mqtt/irrigation/relay6/switch
  payload_on: "1"
  payload_off: "0"
  state_on: "ON"
  state_off: "OFF"
  name: "Test Schalter  6"
- platform: mqtt
  unique_id: Rasenbewässerung rechts
  state_topic: mqtt/irrigation/relay7/state
  command_topic: mqtt/irrigation/relay7/switch
  payload_on: "1"
  payload_off: "0"
  state_on: "ON"
  state_off: "OFF"
  name: "Rasenbewässerung rechts"
- platform: mqtt
  unique_id: Schalter 8
  state_topic: mqtt/irrigation/relay8/state
  command_topic: mqtt/irrigation/relay8/switch
  payload_on: "1"
  payload_off: "0"
  state_on: "ON"
  state_off: "OFF"
  name: "Switch 8"

I created a new page in Lovelace which shows me the six entities as a simple switch. I was also able to separate them into two groups one is lawn irrigation and the other one is drip irrigation.

title: Startseite
views:
  - theme: Backend-selected
    title: Garten
    path: garten
    badges: []
    cards:
      - type: entities
        entities:
          - entity: switch.rasenbewasserung_hochbeet_nord
          - entity: switch.rasenbewasserung_terrasse
          - entity: switch.rasenbewasserung_rechts
          - entity: switch.tropfbewasserung_hochbeet
          - entity: switch.tropfbewasserung_terrasse
          - entity: switch.tropfbewasserung_haus
        title: Bewässerung
      - show_name: true
        show_icon: true
        type: button
        tap_action:
          action: toggle
        entity: group.tropfbewasserung_all
        name: Tropfbewässerung
        show_state: true
      - show_name: true
        show_icon: true
        type: button
        tap_action:
          action: toggle
        entity: group.rasenbewasserung
        icon: mdi:grass
        name: Rasen

and this is how far I got. I do have 6 switches but I am not able to change starting and end times I can only toggle them also the remaining time is not displayed and it does not stop automatically So what I do now I have is timer on my phone and when the timer on my phone rings I will manually stop the irrigation for each zone honestly that’s a big pain in my bum.
So next I would continue to the next step. I would like to activate lawn irrigation in just one switch. So I would start lawn irrigation and set it to duration of 20 minutes then it would start zone one for 20 minutes stop zone one start zone 2 for 20 minutes stop zone two and start zone 3 for 20 minutes stop zone 3 and lawn irrigation is finished.
The remaining time for each zone would be displayed in my Lovelace

Doing some research I found out that
Irrigation unlimited
would fit my needs the best.
But looking at the documentation it seems awfully complicated and way over my skills and open up unfortunately so maybe the very much appreciated community may help me with my issue and lead me to the ultimate goal of having of working but not too complicated lawn irrigation.
Any help and hints it’s highly appreciated to this very new member of home assistant.

Sascha

There’s a topic here worth reading: https://community.home-assistant.io/t/mqtt-based-sprinkler-control/135585

Hey thanks for the tip.
As a matter of fact that one might be even easier for starters because I don’t need to install anything via HACS.
But still I am having difficulties including this in my configuration I might be able to look into it more tonight or tomorrow any other tips are highly appreciated thank you so much I hope that in the end I get more proficient with home assistant because this seems to be extremely challenging.
Problem is I don’t really know where to start.
For more profound users these questions seem to be awfully simple and dull but you can only improve when you start from the beginning.

So again thank you

I have an automation that controls my entire irrigation system. First I have a irrigation control page on the desktop.

This gives me control over how long for each zone and how many cycles. I live in Colorado so irrigation is controlled and I use garbage collection for my days. Thanks to @123 for his help on the automation. He made it a lot more compact.

Here is my automation for irrigation.

- id: '1627491913964'
  alias: Water Lawn with repeat
  description: Water all zones with repeat
  trigger:
  - platform: time
    at:
    - input_datetime.cycle1
    - input_datetime.cycle2
    - input_datetime.cycle3
    - input_datetime.cycle4
    - input_datetime.cycle5
    - input_datetime.cycle6
  condition:
  - condition: state
    entity_id: sensor.watering_days
    state: '0'
  - condition: state
    entity_id: input_boolean.run_irrigation
    state: 'on'
  action:
  - repeat:
      count: '11'
      sequence:
      - variables:
          zone: switch.zone_{{ repeat.index }}
      - service: switch.turn_on
        target:
          entity_id: '{{ zone }}'
      - delay:
          minutes: '{{ states(''input_number.zone'' ~ repeat.index) | int }}'
      - service: switch.turn_off
        target:
          entity_id: '{{ zone }}'
  mode: single

I use a second automation to turn on the main water to the irrigation.

- id: 'Turn on Valve to Irrigation'
  alias: 'Water Lawn - Turn on/off main water '
  description: Open the shutoff valve to the irrigation system
  trigger:
  - platform: time
    at: input_datetime.irrigation_valve_on_morning
  - platform: time
    at: input_datetime.irrigation_valve_on_evening
  - platform: time
    at: input_datetime.irrigation_valve_off_morning
  - platform: time
    at: input_datetime.irrigation_valve_off_evening
  condition:
  - condition: state
    entity_id: sensor.watering_days
    state: '0'
  - condition: state
    entity_id: input_boolean.run_irrigation
    state: 'on'
  action:
  - choose:
    - conditions:
      - condition: time
        after: input_datetime.irrigation_valve_on_morning
        before: input_datetime.irrigation_valve_off_morning
      sequence:
      - service: switch.turn_on
        target:
          entity_id: switch.irrigation_current_value
    - conditions:
      - condition: time
        after: input_datetime.irrigation_valve_on_evening
        before: input_datetime.irrigation_valve_off_evening
      sequence:
      - service: switch.turn_on
        target:
          entity_id: switch.irrigation_current_value
    - conditions:
      - condition: time
        after: input_datetime.irrigation_valve_off_morning
        before: input_datetime.irrigation_valve_on_evening
      sequence:
      - service: switch.turn_off
        target:
          entity_id: switch.irrigation_current_value
    - conditions:
      - condition: time
        after: input_datetime.irrigation_valve_off_evening
      sequence:
      - service: switch.turn_off
        target:
          entity_id: switch.irrigation_current_value
    default:
    - delay:
        hours: 0
        minutes: 0
        seconds: 0
        milliseconds: 10
  mode: single

And here is garbage collection sensor.

#summer months 
garbage_collection
  - name: Watering Days 
    frequency: "weekly"
    collection_days: 
    - tue 
    - thu
    - sun
    first_month: "apr"
    last_month: "oct"
1 Like

Wow that looks amazing but it’s way too complicated for me at the moment. It needs to start easy in order to have a learning curve. Everything including what you have is just overwhelming and too complicated and it will make me think that I will never be able to achieve what I’m trying to do.

But thanks for the input and it’s amazing what can theoretically be done when you know what you’re doing

The scheduler card, available in HACS, may suit your needs.

I have irrigation_unlimited working but I have to admit I am a beginner in both Home Assistant and Irrigation_unlimited. I have 4 solenoids to control garden watering - 3 drips and 1 lawn sprinkler. I define 4 mqtt switches like what you’ve done and I can switch them on and off manually. After installing the irrigation_unlimited custom_components, I define the irrigation_unlimited configuration/schedule in configuration.yaml. As I want my watering frequency to be different for sprinkler and drips, I define 2 zones - one for sprinklers and one for the 3 drips. I also want drips to be started one after the other, I use “sequence” to control the drips (actually I have sprinkler in sequence too but that’s trivial as I only have 1 sprinkler system). To do that, I use the following configurations (I am in Australia so my summer months may not be the same as yours):

irrigation_unlimited:
  granularity: 10
  refresh_interval: 20
  history_span: 7
  history_refresh: 120
  controllers:
    - name: front_garden_controller
      enabled: true
      zones:
        - name: "Lawn Sprinkler"
          enabled: true
          zone_id: 1
          entity_id: "switch.lawn_sprinklers"
        - name: "Front Fence"
          enabled: true
          zone_id: 2
          entity_id: "switch.front_fence_drips"
        - name: "Side Fence"
          enabled: true
          zone_id: 3
          entity_id: "switch.side_fence_drips"
        - name: "Verandah"
          enabled: true
          zone_id: 4
          entity_id: "switch.verandah_drips"
      sequences:
        - name: "Sprinklers"
          zones:
            - zone_id: 1
          duration: '00:20'
          delay: '00:00:20'
          schedules:
            # All year round on Wednesday 60min after sunrise
            - name: "Sprinkler Schedule - All Year Round"
              time:
                sun: "sunrise"
                after: '01:00'
              weekday: ["sun"]
              month: ["jan", "feb", "mar", "apr", "may", "jun", "jul", "aug", "sep", "oct", "nov", "dec"]
            # One extra day (Sunday) during summer 60min after sunrise
            - name: "Sprinkler Schedule - Summer and Fall"
              time:
                sun: "sunrise"
                after: '01:00'
              weekday: ["wed"]
              month: ["dec", "jan", "feb", "mar", "apr", "may"]
        - name: "Drips"
          zones:
            - zone_id: 4
            - zone_id: 3
            - zone_id: 2
          duration:  '00:20'
          delay: '00:00:20'
          schedules:
            # All year round on Saturday 60min after sunrise
            - name: "Drip Schedule - All Year Round"
              time:
                sun: "sunrise"
                after: '01:00'
              weekday: ["sat"]
              month: ["jan", "feb", "mar", "apr", "may", "jun", "jul", "aug", "sep", "oct", "nov", "dec"]
            # One extra day (Tuesday) during autumn 60min after sunrise
            - name: "Drip Schedule - Autumn"
              time:
                sun: "sunrise"
                after: '01:00'
              weekday: ["tue"]
              month: ["mar", "apr", "may"]
           # 2 more days (Mon & Thu) during summer 60min after sunrise
            - name: "Drip Schedule - Summer"
              time:
                sun: "sunrise"
                after: '01:00'
              weekday: ["mon", "thu"]
              month: ["dec", "jan", "feb"]

I do find irrigation_unlimited a bit quirky at times. I sometimes manually disable the irrigation schedule at the “controllers” level (due to rain etc) and find that the schedule does not resume straight away after that and I have to wait overnight or even longer to see the schedule resume. I use the following dashboard card (I think I copied the author’s card) to monitor if schedule is working or not:

type: vertical-stack
cards:
  - type: entities
    entities:
      - type: custom:fold-entity-row
        style:
          .: |
            div#head {
              --toggle-icon-width: 24px;
            }
        head:
          type: custom:multiple-entity-row
          entity: binary_sensor.irrigation_unlimited_c1_m
          state_header: Status
          state_color: true
          entities:
            - attribute: current_duration
              name: Duration
              hide_unavailable: true
            - attribute: time_remaining
              name: Remaining
              hide_unavailable: true
            - attribute: percent_complete
              name: Complete
              unit: '%'
          secondary_info:
            attribute: current_name
            hide_unavailable: true
        padding: 20
        entities:
          - type: custom:multiple-entity-row
            entity: binary_sensor.irrigation_unlimited_c1_m
            name: Enabled
            icon: mdi:sprinkler
            show_state: false
            secondary_info:
              attribute: enabled
            tap_action:
              action: call-service
              service: irrigation_unlimited.toggle
              service_data:
                entity_id: binary_sensor.irrigation_unlimited_c1_m
            entities:
              - attribute: zone_count
                name: Zones
          - type: custom:multiple-entity-row
            entity: binary_sensor.irrigation_unlimited_c1_m
            name: Next
            icon: mdi:clock-start
            show_state: false
            secondary_info:
              attribute: next_name
              hide_unavailable: true
            entities:
              - attribute: next_start
                name: Start
                hide_unavailable: true
                format: datetime
              - attribute: next_duration
                name: Duration
                hide_unavailable: true
      - type: divider
      - type: custom:fold-entity-row
        style:
          .: |
            div#head {
              --toggle-icon-width: 24px;
            }
        head:
          type: custom:multiple-entity-row
          entity: binary_sensor.irrigation_unlimited_c1_z1
          state_header: Status
          state_color: true
          entities:
            - attribute: current_duration
              name: Duration
              hide_unavailable: true
            - attribute: time_remaining
              name: Remaining
              hide_unavailable: true
            - attribute: percent_complete
              name: Complete
              unit: '%'
          secondary_info:
            attribute: current_name
            hide_unavailable: true
        padding: 20
        entities:
          - type: custom:multiple-entity-row
            entity: binary_sensor.irrigation_unlimited_c1_z1
            name: Enabled
            icon: mdi:sprinkler
            show_state: false
            secondary_info:
              attribute: enabled
            tap_action:
              action: call-service
              service: irrigation_unlimited.toggle
              service_data:
                entity_id: binary_sensor.irrigation_unlimited_c1_z1
            entities:
              - attribute: adjustment
                name: Adjustment
              - attribute: schedule_count
                name: Schedules
          - type: custom:multiple-entity-row
            entity: binary_sensor.irrigation_unlimited_c1_z1
            name: Next
            icon: mdi:clock-start
            show_state: false
            secondary_info:
              attribute: next_name
              hide_unavailable: true
            entities:
              - attribute: next_start
                name: Start
                hide_unavailable: true
                format: datetime
              - attribute: next_duration
                name: Duration
                hide_unavailable: true
          - type: custom:logbook-card
            entity: binary_sensor.irrigation_unlimited_c1_z1
            title: History
            attributes:
              - value: current_name
                label: Schedule
              - value: adjustment
                label: Adjustment
            history: 5
            collapse: 2
            show:
              separator: true
            hiddenState:
              - 'off'
      - type: divider
      - type: custom:fold-entity-row
        style:
          .: |
            div#head {
              --toggle-icon-width: 24px;
            }
        head:
          type: custom:multiple-entity-row
          entity: binary_sensor.irrigation_unlimited_c1_z2
          state_header: Status
          state_color: true
          entities:
            - attribute: current_duration
              name: Duration
              hide_unavailable: true
            - attribute: time_remaining
              name: Remaining
              hide_unavailable: true
            - attribute: percent_complete
              name: Complete
              unit: '%'
          secondary_info:
            attribute: current_name
            hide_unavailable: true
        padding: 20
        entities:
          - type: custom:multiple-entity-row
            entity: binary_sensor.irrigation_unlimited_c1_z2
            name: Enabled
            icon: mdi:sprinkler
            show_state: false
            secondary_info:
              attribute: enabled
            tap_action:
              action: call-service
              service: irrigation_unlimited.toggle
              service_data:
                entity_id: binary_sensor.irrigation_unlimited_c1_z2
            entities:
              - attribute: adjustment
                name: Adjustment
              - attribute: schedule_count
                name: Schedules
          - type: custom:multiple-entity-row
            entity: binary_sensor.irrigation_unlimited_c1_z2
            name: Next
            icon: mdi:clock-start
            show_state: false
            secondary_info:
              attribute: next_name
              hide_unavailable: true
            entities:
              - attribute: next_start
                name: Start
                hide_unavailable: true
                format: datetime
              - attribute: next_duration
                name: Duration
                hide_unavailable: true
          - type: custom:logbook-card
            entity: binary_sensor.irrigation_unlimited_c1_z2
            title: History
            attributes:
              - value: current_name
                label: Schedule
              - value: adjustment
                label: Adjustment
            history: 5
            collapse: 2
            show:
              separator: true
            hiddenState:
              - 'off'
      - type: divider
      - type: custom:fold-entity-row
        style:
          .: |
            div#head {
              --toggle-icon-width: 24px;
            }
        head:
          type: custom:multiple-entity-row
          entity: binary_sensor.irrigation_unlimited_c1_z3
          state_header: Status
          state_color: true
          entities:
            - attribute: current_duration
              name: Duration
              hide_unavailable: true
            - attribute: time_remaining
              name: Remaining
              hide_unavailable: true
            - attribute: percent_complete
              name: Complete
              unit: '%'
          secondary_info:
            attribute: current_name
            hide_unavailable: true
        padding: 20
        entities:
          - type: custom:multiple-entity-row
            entity: binary_sensor.irrigation_unlimited_c1_z3
            name: Enabled
            icon: mdi:sprinkler
            show_state: false
            secondary_info:
              attribute: enabled
            tap_action:
              action: call-service
              service: irrigation_unlimited.toggle
              service_data:
                entity_id: binary_sensor.irrigation_unlimited_c1_z3
            entities:
              - attribute: adjustment
                name: Adjustment
              - attribute: schedule_count
                name: Schedules
          - type: custom:multiple-entity-row
            entity: binary_sensor.irrigation_unlimited_c1_z3
            name: Next
            icon: mdi:clock-start
            show_state: false
            secondary_info:
              attribute: next_name
              hide_unavailable: true
            entities:
              - attribute: next_start
                name: Start
                hide_unavailable: true
                format: datetime
              - attribute: next_duration
                name: Duration
                hide_unavailable: true
          - type: custom:logbook-card
            entity: binary_sensor.irrigation_unlimited_c1_z3
            title: History
            attributes:
              - value: current_name
                label: Schedule
              - value: adjustment
                label: Adjustment
            history: 5
            collapse: 2
            show:
              separator: true
            hiddenState:
              - 'off'
      - type: divider
      - type: custom:fold-entity-row
        style:
          .: |
            div#head {
              --toggle-icon-width: 24px;
            }
        head:
          type: custom:multiple-entity-row
          entity: binary_sensor.irrigation_unlimited_c1_z4
          state_header: Status
          state_color: true
          entities:
            - attribute: current_duration
              name: Duration
              hide_unavailable: true
            - attribute: time_remaining
              name: Remaining
              hide_unavailable: true
            - attribute: percent_complete
              name: Complete
              unit: '%'
          secondary_info:
            attribute: current_name
            hide_unavailable: true
        padding: 20
        entities:
          - type: custom:multiple-entity-row
            entity: binary_sensor.irrigation_unlimited_c1_z4
            name: Enabled
            icon: mdi:sprinkler
            show_state: false
            secondary_info:
              attribute: enabled
            tap_action:
              action: call-service
              service: irrigation_unlimited.toggle
              service_data:
                entity_id: binary_sensor.irrigation_unlimited_c1_z4
            entities:
              - attribute: adjustment
                name: Adjustment
              - attribute: schedule_count
                name: Schedules
          - type: custom:multiple-entity-row
            entity: binary_sensor.irrigation_unlimited_c1_z4
            name: Next
            icon: mdi:clock-start
            show_state: false
            secondary_info:
              attribute: next_name
              hide_unavailable: true
            entities:
              - attribute: next_start
                name: Start
                hide_unavailable: true
                format: datetime
              - attribute: next_duration
                name: Duration
                hide_unavailable: true
          - type: custom:logbook-card
            entity: binary_sensor.irrigation_unlimited_c1_z4
            title: History
            attributes:
              - value: current_name
                label: Schedule
              - value: adjustment
                label: Adjustment
            history: 5
            collapse: 2
            show:
              separator: true
            hiddenState:
              - 'off'

It may seem complicated but you can do it, especially with forum help. My only advice is to break it down in pieces. Start with one zone and get that working with an automation. Have it trigger on a hard coded time.

Here is a simple automation that you can set up in the UI.

alias: Water Zone
  description: Water Zone
  trigger:
  - platform: time
    at: '14:05'
condition: []
action:
  - service: switch.turn_on
    target:
      entity_id: switch.rasenbewasserung_hochbeet_nord
  - delay:
      minutes: '1'
  - service: switch.turn_off
    target:
      entity_id: switch.rasenbewasserung_hochbeet_nord

It will water the zone for 1 minutes and shut off. You can then add the next zone and so on until you get everything working. This is brute force and it can leave a zone on but it will help you build and understand exactly what the automation is doing.

Hope this gives you some direction.

gez AllHailJ,

thank you so much for the tip this is exactly what I am looking for easy and understandable to start with the only thing that I figured that I would try to put it into a script rather than into an automation. For that case I put in a input boolean helper called input_boolean rasenbewasserung type is toggle.
So I want to start the sequence you were talking about when I toggle the input boolean switch.
Would that be possible as well?
Anything more fancy will probably go from there.

You will still need an automation to run the script.

If you are doing it from my posted automation you need to change

condition: []

to

condition:
  - condition: state
    entity_id: input_boolean.rasenbewasserung
    state: 'on'

Action will be to just call the script.

Remember Multiple triggers are OR logic

Trigger this time
or
Trigger that time

conditions are and

if trigger true and condition false → No execution

trigger true and condition true —> Execute actions

if you just want to trigger the automation with input boolean

alias: Water Zone
description: Water Zone
trigger:
  platform: state
  entity_id: input_boolean.rasenbewasserung
  from: "off"
  to: "on"
action:
- service: script.turn_on
  data:
  service: script.your_script

Thank you for the help.
Unfortunately I cannot check it at the moment because I’m not home to test it out . It will be the first thing when I’m home at 1700.
But from looking at the the automation it looks rather promising .
The next two goals are to be able to stop the script while still is running. I guess it’s just another automation to stop it all
And also I would like to display the remaining time in my Lovelace when when irrigation automation is running.

So I tested it and work however the triggered with the binary sensor to manually activate doesn’t I can only activate it by manually starting the automation

Bit confused. Which automation did you try?

The modified condition or the one with the input_boolean trigger. Can you post your latest automation.

The count down of time remaining is possible.

You will have to create a sensor

template:
  - sensor:
    - name: "Countdown Water Timer Decimal Minutes"
      unique_id: "Countdown Water Timer Decimal Minutes"
      state: >-
        {{  (( states.input_boolean.rasenbewasserung.last_changed | as_timestamp  -
                utcnow() | as_timestamp  + 
                states('sensor.total_time_watering_seconds') | float(0) ) / 60.0) | round(1) }}

Alternative to AllHailJ’s suggestion, there is a built-in integration called “timer” in Home Assistant. It may help in simplifying your automation. As I’ve mentioned before, I use irrigation_unlimited for the scheduling of my garden watering system. But I also every now and then would want to start watering manually. And I almost always forgotten to switch it off. So, I use the “timer” construct in HA. I define for every drips or sprinklers that I have one corresponding timer eg:

timer:
  hochbeet_nord:
    duration: "00:10:00"
  terrasse:
    duration: : "00:15:00"

Then I set up automation when the corresponding switch is switched on, I start the timer:

- id: hochbeet_nord_start
  alias: Start_Timer_when_hochbeet_nord_turned_on
  trigger:
  - entity_id: switch.rasenbewasserung_hochbeet_nord
    platform: state
    to: 'on'
  action:
  - service: timer.start
    entity_id: timer.switch.hochbeet_nord
    data:
      duration: "00:10:00"

Of course when the timer lapsed, I switch off the corresponding switch:

- id: hochbeet_nord_timer_lapsed
  alias: When_hochbeet_nord_Timer_Lapsed
  trigger:
  - platform: event
    event_type: timer.finished
    event_data:
      entity_id: timer.hochbeet_nord
  action:
  - service: switch.turn_off
    entity_id: switch.rasenbewasserung_hochbeet_nord

There are times that I want to manually stop the watering in the middle of it, I need to make sure the timer is reset too:

- id: hochbeet_nords_stop
  alias: reset_timer_when_hochbeet_nord_switch_turned_off
  trigger:
  - entity_id: switch.rasenbewasserung_hochbeet_nord
    platform: state
    to: 'off'
  action:
  - service: timer.cancel
    entity_id: timer.hochbeet_nord

I also put the timer in the dashboard so I could see the remaining time, eg:

type: entities
entities:
  - entity: timer.hochbeet_nord

That’s the gist of it. Hope it is helpful to some if not the immediate OP. Of course I didn’t implement exactly like the above - I have the timers tie to input_numbers and also in dashboard I use a custom:timer-bar-card.

This is my working setup so far.
Automation:

alias: Rasenbewässerung Automatik
description: ''
trigger:
  - platform: state
    entity_id: input_boolean.rasenbewasserung
    from: 'off'
    to: 'on'
action:
  - service: switch.turn_on
    data: {}
    target:
      entity_id: switch.rasenbewasserung_hochbeet_nord
  - delay:
      minutes: '20'
  - service: switch.turn_off
    target:
      entity_id: switch.rasenbewasserung_hochbeet_nord
    data: {}
  - service: switch.turn_on
    data: {}
    target:
      entity_id: switch.rasenbewasserung_terrasse
  - delay:
      hours: 0
      minutes: 20
      seconds: 0
      milliseconds: 0
  - service: switch.turn_off
    data: {}
    target:
      entity_id: switch.rasenbewasserung_terrasse
  - service: switch.turn_on
    data: {}
    target:
      entity_id: switch.rasenbewasserung_rechts
  - delay:
      hours: 0
      minutes: 20
      seconds: 0
      milliseconds: 0
  - service: switch.turn_off
    data: {}
    target:
      entity_id: switch.rasenbewasserung_rechts
mode: single

This is the automation to turn it off

alias: Rasenbewässerung Automatik stoppen
description: ''
trigger:
  - platform: state
    entity_id: input_boolean.rasenbewasserung
    from: 'on'
    to: 'off'
condition: []
action:
  - service: switch.turn_off
    data: {}
    target:
      entity_id:
        - switch.rasenbewasserung_hochbeet_nord
        - switch.rasenbewasserung_terrasse
        - switch.rasenbewasserung_rechts
    data: {}
  - service: switch.turn_off
    data: {}
  - service: switch.turn_off
    data: {}
    target:
      entity_id: input_boolean.tropfbewasserung
mode: single

drip irrigation was a lot easier, because I can run the 3 circles simultneously.
How can I display the remaining time for each zone in lovelace?
And how can I alter the irrigation dutation?

So say I want to use that code - do I have to create an entity within config.yaml?
Or do I paste it somewhere else?

How can I display the remaining time for each zone in lovelace?

The code I posted (below)

template:
  - sensor:
    - name: "Countdown Water Timer Decimal Minutes"
      unique_id: "Countdown Water Timer Decimal Minutes"
      state: >-
        {{  (( states.input_boolean.rasenbewasserung.last_changed | as_timestamp  -
                utcnow() | as_timestamp  + 
                states('sensor.total_time_watering_seconds') | float(0) ) / 60.0) | round(1) }}

would be pasted in config.yaml or in an include file if you use it.

And how can I alter the irrigation dutation?

Create inputs_numbers for the desktop/Lovelace

Input_number:
  rasenbewasserung_hochbeet_nord:
    name: Rasenbewasserung Hochbeet Nord
    icon: mdi:clock-start
    min: 1
    max: 30
    step: 1
    mode: slider
    unit_of_measurement: min

In the automation change the delay for each zone to

- service: switch.turn_on
    target:
      entity_id: switch.rasenbewasserung_nord
  - delay:
      minutes: "{{ states('input_number.rasenbewasserung_nord') | int(0) }}"
  - service: switch.turn_off
    target:
      entity_id: switch.rasenbewasserung_nord

You will need a input number for each zone.

Would that create an entiy or where is it found when included?

I create a new card, put that in.yaml

type: Input_number
  rasenbewasserung_hochbeet_nord:
    name: Rasenbewasserung Hochbeet Nord
    icon: mdi:clock-start
    min: 1
    max: 30
    step: 1
    mode: slider
    unit_of_measurement: min

and I got this as a result:

bad indentation of a mapping entry (2:33)

 1 | type: Input_number
 2 |   rasenbewasserung_hochbeet_nord:
-------------------------------------^
 3 |     name: Rasenbewasserung Hochbeet Nord
 4 |     icon: mdi:clock-start

seems awefully wrong.

should be input_number not Input_number. Mea Culpa!