ZoneFlow

Set a Timer on the Valve Itself: The Safety Net for When Home Assistant Stops

2026-10-20

ZoneFlow opens your valve, waits, and closes it. Every time. But "closes it" is something Home Assistant does, and Home Assistant is a computer. It restarts for updates, loses Wi-Fi, runs out of disk or loses power.

If that happens while a valve is open, nothing is left to send the "close" command. The water keeps running until someone notices. It's rare, but when it happens it costs a flooded bed, a dead lawn or a big water bill.

The protection sits in the hardware, not in software. It has three parts, and each covers a different failure.

1. An auto-off timer on the switch

Most good smart switches can turn themselves off a set time after they were switched on. That timer lives inside the device, so it keeps counting when Home Assistant is down. ZoneFlow does the normal closing, and the timer is the backup.

How long should it be?

The timer has to be longer than the longest time ZoneFlow keeps the valve open in one go. Otherwise it cuts a normal watering short and ZoneFlow never notices.

The longest time is one pulse, not the whole watering. ZoneFlow splits a watering into pulses with the valve closed in between, so more pulses means a lower number.

You don't have to work it out. Each zone shows it as Longest Valve Open Time (Settings, Safety), and Check my setup gives you the timer to set: the longest time plus 10 minutes or 20 %, whichever is more, rounded up to the next 5 minutes.

Example (made-up numbers, not a real zone):

  • Longest open time 20 minutes. 20 % is 4, so the 10 minutes wins. 20 + 10 = 30. Set 30 minutes.
  • Longest open time 60 minutes. 20 % is 12, which is more than 10. 60 + 12 = 72, rounded up to 75 minutes.

Which switches can do this

We won't write a manual for every brand. What matters is that the switch has a timer that runs on the device. These are the common ones that do:

  • Shelly (Plus 1, Plus 1PM, Plus 1 Mini and similar relays): the Auto off setting on the device's Timer tab, in seconds.
  • Tasmota (on Sonoff and many other relays): the PulseTime command.
  • ESPHome: a delay after turn-on followed by a turn-off, written in the device's own config.
  • Sonoff with its stock firmware: Inching mode works without internet. Check that your model has it, as one forum report puts its maximum at 1 hour.
  • Other brands: look for "auto off", "countdown" or "timer" in the device's own app, and check that it counts from when the switch turns on and not from a clock time.
  • Zigbee-only valves: it depends on the device. Some have a timer, some don't. Read the manual before you buy.

If your switch has no timer of its own, we strongly recommend getting one that does. Switches like these are affordable. They pay for themselves in peace of mind, and the first time something goes wrong.

2. Make the switch start in the "off" state

A power cut and the power coming back is its own risk. Some switches remember their last state and turn back on by themselves. If the valve was open when the power went, it could open again as soon as the power returns.

Set the switch so it always starts off after a power cut:

Look for a setting called "power-on state", "power-on default" or "restore state" in the device's own settings or app, and choose Off.

3. Use a normally closed (NC) valve

A normally closed valve closes by itself when it loses power. A spring does it, and nothing needs to be told. Together with the switch above, a power cut leaves your garden dry, not flooded.

Check the valve you buy. A typical irrigation solenoid valve is normally closed. Some motorised ball valves are different: they only move when powered, so they stay where they were when the power fails. Those don't give you this protection.

Tell ZoneFlow what you set

ZoneFlow can't read the timer from the device, so type the minutes into My Valve's Own Timer (Safety settings) on the zone. Check my setup then does three things:

  • It warns you if the timer is shorter than the longest open time, and tells you what to set instead.
  • It shows a tick if the timer is enough.
  • It warns you again later if you change a pulse count, a gap or the flow rate and the longest time grows past your timer.

One exception: a typed Water now

If you type a long Water now, say 45 minutes on sandy soil that takes it in one go, its longest pulse can be longer than the number above. The Longest Valve Open Time sensor gives that figure in its with_water_now_minutes attribute. Use it if you want the timer to cover those runs too.

Quick checklist

  1. Does your valve switch have an on-device auto-off timer? If not, get one that does.
  2. Read the recommended timer in Check my setup.
  3. Set it on the device.
  4. Set the switch to start off after a power cut.
  5. Use a normally closed valve.
  6. Type the minutes into My Valve's Own Timer.
  7. Test it once: set a short timer, switch the valve on from Home Assistant, then unplug the router or stop Home Assistant. The valve should close by itself. Then set the real timer.

Related docs: Valve backup timer · Safety limits and pump · Status, notifications and repairs · Getting started