Migrating your configuration and keeping similar names would look something like this:
irrigation_unlimited:
controllers:
zones:
- name: "A"
zone_id: a
entity_id: "switch.my_valve_a"
- name: "B"
zone_id: b
entity_id: "switch.my_valve_b"
- name: "C"
zone_id: c
entity_id: "switch.my_valve_c"
sequences:
- duration: "0:05:00"
schedules:
- time: "06:00"
zones:
- zone_id: a
- zone_id: b
- zone_id: c
The above zones are named A, B and C. A sequence is setup and scheduled to start at 06:00 and run each zone for 5 minutes one after the other. From here you can adjust the setup to suit.
Perform a manual_run service call on sequence_id 1. This will run the first sequence (there is only one but you can have more). Here we run it for 15 minutes, note this is the entire sequence time.
This is like a âskipâ function. Partially supported by the cancel service call. You can cancel a running zone but the next zone wonât start until the allotted time.
The shims are support services outside of the integration. They provide a go between the integration and the front end to make things more friendly. Hopefully one day this functionality will be incorporated into the front end. See above post regarding creating a ha-card.
The times are read on startup and stored in memory. Adjustment service calls alter these values, still in memory and are exposed to the world in the âadjustmentâ attribute on the controller and zone entities. Here is the trick, Home Assistant automatically records all the states and attributes of your entities by default in an sql-lite db. So when Irrigation Unlimited starts up it restores the adjustment from HA history. This means the adjustments last forever and persist across HA restarts. This is also true for enable/disable.
The default for zone_id in the zone objects is 1, 2, 3 etc. so you donât need to set it. In the above example I have changed it to a, b, c but then you must change the reference in the sequence zones to match. If you want to change from a, b, c system to 1, 2, 3 then the configuration can be simplified.
Briefly, zones represent physical valves which are all independent of each other. Sequences allow you to group the zones and run them in a particular order. Schedules can be attached to either zones which means they will each march to their own tune - possibly even overlap (multiple valves open) or attached to a sequence where you instruct the commencement as a series.
Just one thing. YAML is very picky about indentation and it means a lot. If you share your configuration please put it in fenced code blocks. This will stop the text being squished to the left hand margin and help a lot with support. For example.
Hi, Iâm Just starting to add my irrigation sensor to Home Assistant. Iâve installed Irrigation Unlimited and it seems to be working. In my old system I had a rain sensor (Rain Bird WR2-48) and it is now an ESPHome binary sensor. Is there a way to stop irrigation while the rain sensor is active?
Sure is. This automation is an adaptation from the ESPHome soil moisture adjustment example in the README. Change binary_sensor.rain_sensor to whatever the entity is actually called in Home Assistant (2 places in the example below). Basically, the automation will trigger when the sensor changes state. If the sensor is on it will adjust the time to 0% or if off to 100%. Note: I have not actually tested this so typos are possible but you get the idea. If possible, please publish your final work to help the community.
Thanks for the reply. I am getting much more used to the nuances of the nesting so I should have just worked harder before bothering you. Now that I immediately have moved to on to trying more complicated things, I may have more questions, but again- I am trying to slog it out first with more trial and error.
Thatâs a pity. Any plans to have this optional as service parameter (directly start next zone yes/no).
And regarding cancel. Yes, saw this, but then I have to know, which zone is currently running in such schedule, havenât I?
Didnât get this. Where and why is there a difference between the documented services, e.g. manual_run and this undocumented services, e.g.shim_manual_run
Hm, didnât see this before in HA. I define fixed values, they are afterwards fix in yaml, but the integration changes this and stores and uses other values from memory. If I later on have to debug and double-check, I will find different information stored in yaml and what the integration is using? And always have to e.g. use adjust, reset to have a save and comparable situation?
Sorry for being a bit presumptous. There are a number of ways to setup automations in HA. My personal favourite is via packages which keeps things organised. But yes, copy the code into automation.yaml but get rid of the automation: line (everything in this file is assumed to be an automation) and pull all the text two spaces to the left so the - alias... starts in column 1.
Go to Configuration â Settings â Server Control. Press CHECK CONFIGURATION and then under YAML configuration reloading press AUTOMATIONS. Now under Configuration â Automations & Scenes you should see the automation listed.
Cancellations. You can send the cancel to the controller which will propagate it to all the zones. The cancel function is fairly basic by just deleting the current run out of the zone queue. There are no plans in this area simply because no-one has made any suggestions and I donât really use it all that much. Thatâs not to say it couldnât stand some attention. One thing is it is naive to any sequence. It would be nice to cancel out an entire sequence run and as part of that skipping as you suggested.
Shims. These are pyscript routines which are intended to be interim solutions until a fully formed frontend card can be developed. As a consequence not an overwhelming amount of effort have been expended but they are somewhat self documenting if you go into Developer Tools â Services and look at them. The code can be found in the repository if you are curious and the install instructions are in the readme.
So what do they do? list_configuration will load up an input_select control with pretty formatted configuration data like â1.0 My Gardenâ, â1.1 Vege Bedsâ etc. You can now drop this control onto a card for the user to make a selection. The other shims (manual_run, enable/disable) take as an argument the name of this input_select control, read the selected contents and convert it to an entity_id like binary_sensor.irrigation_unlimited_c1_z1 and then call the real service. The shims simply run interference and make the interface a nicer user experience.
Adjustments. Bottom line is adjustments last until they are subsequently overwritten/reset. The yaml is read-only and consumed at startup/reload but it doesnât hold adjustments. Service calls are the only way to set adjustments and these are logged for a traceback if needed. The current adjustment in play is exposed via an attribute in the entity. Meanwhile, HA is merrily recording all the changes and it forms the basis of history, stats, charts and all the other wonderful things it does.
This automation is working great on by bench set up but I have now added another zone to my system that will water potted plants on my covered patio. Can i have a zone that will not respond to the rain sensor?
Yes, in the example above the entity_id: for the service call was `binary_sensor.irrigation_unlimited_c1_mâ which is the controller or master and will effect all zones. For a more targeted approach you have several options available:
For individual zones set the entity_id: to a specific zone like binary_sensor.irrigation_unlimited_c1_z1.
If you are using sequences then target the run. As sequences belong to the controller, go back to the original entity_id: for the controller but add a sequence_id: 1 which is the first sequence in your configuration. You can go a step further by even changing part of the sequence.
There is a whole section on how to hit the right spot in the readme
Thank you. I changed the automation by adding actions to turn off multiple zones when the rain sensor is on.
I was going to post my work but I canât see where to upload a file in this forum.
Check the pyscript installation and there are no errors in the log. The dropdownâs are created and loaded using this file which should be loaded in the packages directory. Perhaps manually run the automation to check it works and there are no errors.
There is no card for adjusting the watering times as this is usually done by an automation using weather data, soil moisture probe or other integration. There are a few examples in the readme. You can make a service call in Developer Tools â Services. What do you mean by start/stop a zone?
you can do this with an automation and a inpu_number: you just need to call the service adjust_time for you zone or controller with the value of the input_number. For stop and start you can use a button or switch or something and use the manual_run/cancell service or the enable/disable service this depends on what you want to start or stop
I had this working well and the I decided to add a helper that would bypass the rain sensor. In the automation I tried to put in an AND function so that the rain sensor had to be ON (AND) the rain senor bypass had to be OFF to prevent the zone from operating. Home Assistant accepted the file and restarted OK but when I tried it with the rain sensor ON and the bypass OFF the zone still operated for 100% of the time.