Leak and Freeze
Automatic shutoff valves
A sensor warns; a valve stops the water. When a motorized valve on the main is worth it, and how to wire it to every sensor at once.
A leak sensor can only tell you about water. If nobody is home, or nobody hears the alert, the water keeps running until someone closes the main. An automatic shutoff valve on the main line closes it for you the moment a sensor reads wet. Triple-I suggests considering a water leak monitoring and shut-off system. One valve answers every sensor in the house, which is why it matters most in a house that sits empty in winter or keeps its laundry upstairs.
What it does
A motorized valve sits on the main water line just after the meter. When any leak sensor reads wet, an automation closes the valve and the whole house stops drawing water. You open it again by hand or from the app once the leak is found.
When it is worth it
- The house sits empty for days in winter. Nobody is there to close the main when a sensor goes off, and policies often expect the water off or the heat on while a home is vacant.
- The laundry is on an upper floor. IBHS notes that a washer upstairs makes any failure worse, because the water comes down through finished ceilings.
- You have many sensors. One valve answers all of them; the plan builder flags it from six leak sensors up, as this site's judgment.
In Home Assistant
A motorized valve shows up as a valve entity, and the action that closes it is valve.close_valve. The automation below closes the valve first and notifies second, so the water stops even if the message is slow.
Close the main when any sensor is wet
Two sensors and a valve, as an example. Rename the entities to match your own.
- alias: "Leak: a sensor is wet"
mode: single
triggers:
- trigger: state
entity_id:
- binary_sensor.water_heater_leak
- binary_sensor.washer_leak
to: "on"
actions:
- action: valve.close_valve
target:
entity_id: valve.main_water
- action: notify.notify
data:
title: "Water detected"
message: "{{ trigger.to_state.name }} is wet. The main water valve is closing."
- alias: "Watch: a water sensor went quiet"
mode: queued
triggers:
- trigger: state
entity_id:
- binary_sensor.water_heater_leak
- binary_sensor.washer_leak
- valve.main_water
to: "unavailable"
for:
hours: 24
actions:
- action: notify.notify
data:
title: "A water sensor is offline"
message: "{{ trigger.to_state.name }} has not reported for 24 hours. Check its battery."
Want one for your own house? The sensor plan builder writes it for exactly the sensors you have.
Sources
- Triple-I: How to protect your home from water damage Insurance Information Institute, accessed October 25, 2026
- IBHS: State of the Risk, Interior Water Damage (white paper, December 2024) Insurance Institute for Business and Home Safety, accessed October 25, 2026
- NAIC: Will my homeowners insurance policy cover water damage from a burst pipe? National Association of Insurance Commissioners, accessed October 25, 2026
- Home Assistant: Valve (valve.close_valve) Home Assistant, accessed October 25, 2026
Drafted with a language model on October 25, 2026 from the sources listed above, each opened that day. Every threshold and count on the page comes from the site's own code, held by a test. The editor samples pages after they publish; nothing here is an inspection of your house or advice from a licensed plumber or insurer.
Found an error? See Corrections.