View on GitHub

Smart Irrigation

A Home Assistant integration to optimize irrigation

Off-the-shelf controllers

Main page: Usage
Previous: Automations
Next: Troubleshooting

If your valves are wired to a commercial controller, you do not have to replace it. Smart Irrigation decides how long each zone waters, and the controller runs the valves, through the action its Home Assistant integration provides. One blueprint per controller does the plumbing:

Controller Integration Action the blueprint calls Unit Longest run
Rain Bird Rain Bird (built in) rainbird.start_irrigation minutes 1440 min
Hunter Hydrawise Hydrawise (built in) hydrawise.start_watering minutes 1440 min
Rachio Rachio (built in) rachio.start_watering minutes 180 min
OpenSprinkler hass-opensprinkler (HACS) opensprinkler.run_station seconds 64800 s
Orbit B-hyve bhyve-home-assistant (HACS) bhyve.start_watering minutes 1440 min

This is different from direct valve control, which opens and closes a switch or valve entity itself. A controller does not expose its zones that way: you hand it a duration, it starts its own timer and stops on its own. That is what the blueprints do.

These blueprints have not yet been confirmed on real hardware. They were written against each integration's documented actions and their templates are rendered by Home Assistant's own engine in our tests, but we do not own the controllers. If you do, a word in the discussions saying it works, or what it needed, is the most useful contribution there is.

Before you start

  1. Smart Irrigation calculates. At least one zone is in automatic mode and the Info tab shows a duration for it after the daily calculation.
  2. A start trigger is set on the General page. The blueprints listen to the smart_irrigation_start_irrigation_all_zones event; without a trigger, that event never fires and nothing waters.
  3. The controller's integration is set up in Home Assistant and its zones show up as entities.
  4. The controller's own schedule is off for the zones Smart Irrigation will drive. Otherwise it waters twice: once on its own program, once on ours. How to do that for each brand is below.

Set up one zone

The blueprints are copied into your own blueprints/ folder when the integration starts, so they are already in Home Assistant. If you do not see them, or want the latest version, use the import links on the automations page.

  1. Go to Settings > Automations & scenes > Blueprints and pick Smart Irrigation with Rain Bird (or Hydrawise, Rachio, OpenSprinkler, B-hyve).
  2. Click Create automation and fill in the three fields:
    • Smart Irrigation zone: the zone's duration sensor, sensor.smart_irrigation_<zone name>. The list only offers Smart Irrigation duration sensors.
    • Controller zone: the entity of the controller zone that waters it. Which entity that is depends on the brand, see the notes below. The list is filtered to that integration.
    • Reset the bucket after the run: leave it on, unless observed watering already watches this controller zone. In that case turn it off, or the run is credited twice.
  3. Save, give the automation the zone's name, and repeat for every zone.

One automation per zone is deliberate: each zone has its own duration and its own bucket.

What happens at run time

When the start trigger is reached, every automation created from these blueprints wakes up at the same moment and does the same thing:

  1. Checks the duration. If the zone's duration is 0, nothing happens. On a skip day the start event is not fired at all, so nothing happens either.
  2. Converts the duration to what the controller takes. Smart Irrigation counts in seconds. Rain Bird, Hydrawise, Rachio and B-hyve take whole minutes, so the run is rounded up (a calculated 3 min 10 s becomes 4 min: a little too much water is better than a deficit left behind) and is at least 1 minute. OpenSprinkler takes seconds and gets them as they are. Every run is capped at the longest run the controller accepts, see the table above. Rachio's cap of 3 hours is the one you may actually hit: if a zone regularly needs more, check its throughput and precipitation rate on the zones page.
  3. Starts the controller zone for that time. The controller runs its own timer and stops the valve itself.
  4. Waits the same time, then resets the bucket of the zone, so the next calculation starts from a full soil. If you turned the reset off, the automation just ends.

The automation runs in single mode: a second start event while a run is in progress is ignored.

The controller's own rain sensor or rain delay. If your controller cancels or shortens a run on its own (a wired rain sensor, a rain delay set in the app), the blueprint does not know: it waits the full time and resets the bucket as if the water had gone in. Two ways to keep the books right. Either turn that feature off on the controller and let Smart Irrigation decide, since it already accounts for rain, or use observed watering on the controller zone and turn the blueprint's reset off, so the bucket is credited with what actually ran.

Several zones

All the automations start at the same event, so the controller is asked to start every zone at once. What happens next is the controller's business:

If your controller refuses or drops a start while a zone is running, chain the zones yourself. Open the second zone's automation, choose Take control from its menu (the automation stops following the blueprint and becomes editable), and replace its trigger: instead of the start event, trigger on the first controller zone turning off (a state trigger on that entity, from on to off). Keep the actions as they are. Do the same for the third zone on the second, and so on: the zones water in the order you chose, each for its own duration. The automations that keep the blueprint still update when the blueprint does; the ones you took control of do not, which is fine, they are two lines long.

Per controller notes

Rain Bird

Hunter Hydrawise

Rachio

OpenSprinkler

Orbit B-hyve

Telling us how it went

Each blueprint says in its description that it is not yet confirmed on real hardware. When you have run one, please post in the discussions: the controller model, whether the zone started and stopped at the right time, and anything you had to change. Once a controller is confirmed we remove the warning from its blueprint.

Main page: Usage
Previous: Automations
Next: Troubleshooting