I’ve been running my irrigation (an OpenSprinkler controller) from Home Assistant for a while, and I finally cleaned up and genericized the decision layer I built on top of it. Sharing under MIT in case it’s useful.
The idea that makes it portable: the logic never calls the controller directly — it calls a small adapter (run_lawn_cycle / run_dripper_cycle + a couple of gates). Two adapters ship — an OpenSprinkler one and a generic switch/valve one — so the whole thing works with Rain Bird, Zigbee valves, ESPHome relays, or plain switches too.
What it gives you:
- A modes framework — Schedule / Sunrise / Interval / Smart / Off per program, with guaranteed mutual exclusion so two mechanisms can never double-water.
- Smart mode — waters on real soil-moisture demand (driest sensor governs), with a drying-rate learner that predicts the next watering.
- Sunrise mode — finishes at sunrise and drifts with the season.
- A weather-based demand advisor — a plain “should I water today, and how much?” readout (water AM+PM / sunrise only / hold) based on how thirsty the weather is: temperature, humidity, rain, and how fast things are drying. It ships with a plain-English explainer and a ready-made sensor, so no weather-science background is needed.
The part that makes it unusual: none of it runs on a timer. Every decision comes from your soil-moisture sensors and the weather, and it even learns how fast your own soil dries so it can anticipate the next watering. Watering on a schedule is common; letting the garden’s actual condition and the weather make the call is not, and that’s really the point of the whole thing.
Builds on the nielsfaber/scheduler-component and vinteo/hass-opensprinkler work — thanks to those maintainers. To be clear, it’s my own config layer that’s imperfect and still evolving — not their integration or the controller — but it’s been reliable in daily use. Test with the water off first. Repo: