Home » Blog » Water Your Garden Automatically NOW with Home Assistant!

Water Your Garden Automatically NOW with Home Assistant!

I almost killed my FrangiPani plants this summer โ€” not from neglect, but from a watering schedule that watered exactly the same amount every single day, rain or shine. One day it hadn’t rained in a week. The next, it had poured for six hours the night before. My irrigation timer had no idea. So I built something that does: a Home Assistant garden watering automation that actually reads the weather before deciding whether โ€” and how long โ€” to water.

๐Ÿ”— Order the Shelly Ecowitt WS90 here: https://upf.ai/aa9empsr

GET 10% DISCOUNT FOR ALL SHELLY PRODUCTS BY USING THIS CODE: SMARTHOMEJUNKIE10

Or buy it via Amazon:

๐Ÿ”— Order a Sonoff Smart valve:


โญโญโญ NOTE: โญโญโญ

This article belongs to a YouTube video. I wrote it before recording the video. You can help me continue doing this by checking out the video, commenting on it, giving it a thumbs up, andย subscribing to my YouTube channel. This will ensure that the video is offered more frequently to new visitors, allowing them to stay informed about the latest Home Assistant tutorials and smart home-related product reviews.

I appreciate your support!

Ed

Click here to watch the video

What This Blueprint Actually Does

Instead of watering on a fixed schedule, this Home Assistant automation makes one watering decision a day, at sunrise or sunset, based on three numbers it tracks continuously since the last time it watered: the highest temperature recorded, the total rainfall that’s actually fallen, and โ€” if you give it a weather entity โ€” the rain expected in the next eight hours.

Those three numbers feed into four escalating watering rules. A properly hot, dry day triggers immediate, longer watering. A milder day won’t trigger anything on its own, but if two or three days pass without a hotter rule firing, a lower threshold kicks in and the garden still gets a shorter watering. If more than three days go by and nothing qualifies โ€” because it’s simply been cool โ€” the automation resets its counters without watering rather than letting the numbers pile up. Seven background triggers keep everything updated in real time, so by the time sunrise or sunset rolls around, the decision is instant.

What You Need to Get Started

The required list is short: a switch entity controlling your pump or valve (any Home Assistant compatible smart plug or relay works), a temperature sensor, and a rain sensor. These can come from an existing weather integration like OpenWeatherMap, or from your own hardware.

Everything else is optional. Add a weather integration that supports hourly forecasts โ€” OpenWeatherMap is the easiest to set up โ€” and the automation factors tomorrow’s expected rain into its decision, so it won’t water right before a downpour it could see coming. Prefer to keep things entirely local? A station like the Ecowitt WS90 (the Shelly-powered version) gives you your own temperature and rain data with zero dependency on an external API, though you’ll lose the forecast piece.

Installing the Helpers and the Blueprint

The automation relies on seven small helper entities to remember state between runs. These ship as YAML helpers in a package file โ€” drop garden_watering_helpers.yaml into config/packages/, make sure packages: !include_dir_named packages is set under your homeassistant: block, and restart. Because these are YAML helpers, any future tweaks go back into the file rather than the Helpers UI.

From there, importing the blueprint itself (garden_watering.yaml, placed in /config/blueprints/automation/smarthomejunkie) and creating a new automation from it exposes every field the automation needs.

The Field That Trips People Up

Most of the fields are self-explanatory โ€” pick your pump switch, your temperature sensor, your weather entity if you have one. But the rain sensor deserves a specific warning: this blueprint adds whatever the sensor reports every time it changes, so it needs to report rain since the last update, not a running daily total. Pick a cumulative “total rain today” sensor by mistake, and every update multiplies the same rainfall into the total. If you’re using an Ecowitt WS90, which stores a cumulative value, a small helper automation converts it into a current-rainfall reading โ€” it’s included in the package.

Tuning the Watering Rules

The real power is in the four watering rule thresholds, each fully editable. Out of the box, they’re tuned to a Dutch climate: a hot, dry day (above 30ยฐC, under 20mm of rain) waters for 45 minutes; milder multi-day rules step down to 30, 20, and 15 minutes as conditions cool off. A Mediterranean garden and a shaded backyard shouldn’t share the same numbers, so these are meant to be adjusted to your own conditions.

Timing is equally flexible โ€” sunrise or sunset, with an offset if you want it earlier or later. There’s also a small housekeeping detail: when watering runs at sunset, a helper resets the day’s maximum recorded temperature the following sunrise, so the count doesn’t carry over inflated. The blueprint handles this automatically.

Verdict

If you’ve ever come home from a week away to a dead planter, or you’re tired of running a hose on a day it’s already raining, this is worth the twenty minutes it takes to set up. It only needs a switch and two sensors to get running, scales up cleanly with an optional weather integration, and it’s genuinely more accurate than any fixed schedule could be. If you’ve only got a couple of pots on a balcony, this is probably more automation than you need โ€” but for an actual garden, it earns its keep fast.

๐Ÿ‘‰ Download the Blueprint here: https://ko-fi.com/s/2847a3d6ef

๐Ÿ”— Order the Shelly Ecowitt WS90 here: https://upf.ai/aa9empsr

GET 10% DISCOUNT FOR ALL SHELLY PRODUCTS BY USING THIS CODE: SMARTHOMEJUNKIE10

Or buy it via Amazon:

๐Ÿ”— Order a Sonoff Smart valve:

Please follow and like us:

,

Back to all articles