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.
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
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:
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.
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?
Thank you for the help again.
I now created two helpers - one for lawn irrigation and one for drip irrigation
input_number.dauer_tropfbewasserung
and
input_number.dauer_rasenbewasserung
how do I change the automation that it takes the specified time for the duration of the irrigation instead of the fixed 20 minutes of zone as of now it’s fine with me that each zone has an equal length and I could easily change it separately from there.
I tested this in the developer tools. I set variables and output the variables for each condition. My zone time is in minutes so that is why it is multiplied by 60. This will updated once a minute.