Smart Home Assistant

Home Assistant Water Leak Alert: Loud Phone Alerts

SepehrBy Sepehr· 16 November 2026· Updated 16 November 2026· 8 min read
✓ Independent — no paid placements✓ UK-tested in real homes✓ Cited sources
Illustration of a dripping tap above a white leak sensor on a wet floor beside a phone showing an alert

Key takeaways

  • Make the alert critical: iOS critical alerts and Android's alarm stream sound even when the phone is muted, unlike a normal banner notification.
  • Do not add a for delay to a leak trigger; unlike a fridge door, a wet sensor should alert straight away.
  • Use a repeat loop that stops when the sensor reads dry, capped at ten reminders so a stuck sensor cannot loop forever.
  • Add an unavailable-for-six-hours alert, because a dead sensor in a damp, cold spot protects nothing and fails silently.
  • Know where your internal stop tap is, usually under the kitchen sink, and turn it clockwise slowly without forcing it.
On this page[tap to expand]

A Home Assistant water leak alert is an automation that sends a loud notification to your phone the moment a leak sensor reports water. You need one sensor, the Companion app and about 20 minutes. The step that matters most is making the alert impossible to sleep through.

Most guides stop at a quiet banner notification, which is fine for a dripping tap and useless at 3am. The steps below build a basic alert, upgrade it to a critical one, repeat it until the floor is dry, warn the whole household, optionally close a motorised valve, and make sure a dead sensor cannot fail silently.

What do you need before you start?

  • A leak sensor: a Zigbee, Z-Wave, Thread or Wi-Fi water sensor that Home Assistant can see. Our best smart water leak sensors roundup covers what to buy. Whatever the brand, it should appear as a binary sensor with the moisture device class.
  • The Companion app: it provides the notify.mobile_app_<your_phone> action used throughout. If it is not set up yet, follow the mobile app guide.
  • Your entity IDs: find them under Settings → Devices & services → Entities. The examples use binary_sensor.kitchen_leak and binary_sensor.utility_leak; swap in your own.
  • Optional: a motorised shut-off valve that Home Assistant exposes as a valve or switch entity, covered in Step 5.

Where should you put leak sensors?

Put them where water collects first, not where you would notice it first. The usual culprits are the floor beside a washing machine or dishwasher, under the kitchen sink, behind the toilet, beside the boiler or hot water cylinder, and in a utility room or loft near a header tank. Place the sensor flat on the floor with its probes touching the surface, at the lowest point, because water runs downhill and a sensor on a shelf will only trigger once the leak is serious.

Wired probe cables are worth considering for tight spots such as under a sink, because the cable lets the radio body sit somewhere with a better signal. If you are also protecting a washing machine, our washing machine finished notification guide uses a different signal (power draw) and pairs well with a floor sensor.

Step 1: Check what your sensor reports

Open Developer tools → States, search for your sensor and look at its state. According to the Home Assistant binary sensor documentation, the moisture device class reports on when moisture is detected (shown as Wet) and off when none is (shown as Dry).

Now test it for real: touch the probes with a damp paper towel or dip them in a saucer of water and watch the state flip to on, then dry them and confirm it returns to off. Doing this before you write any automation tells you how quickly the sensor reports and whether your radio coverage is adequate at that spot. Note the sensor's friendly name too, because the notification will use it to say which room is flooding.

Step 2: Create a basic leak alert

Go to Settings → Automations & scenes → Create automation, switch to YAML from the three-dot menu and paste this. A leak is not something to debounce for minutes, so there is no for delay on the trigger.

alias: Water leak alert
mode: parallel
triggers:
  - trigger: state
    entity_id:
      - binary_sensor.kitchen_leak
      - binary_sensor.utility_leak
    to: "on"
actions:
  - action: notify.mobile_app_your_phone
    data:
      title: "Water leak detected"
      message: "{{ trigger.to_state.name }} is reporting water."
      data:
        tag: water-leak

One automation covers every sensor in the list, and trigger.to_state.name tells you which one fired. The parallel mode lets a second sensor trigger its own run while the first is still going, which matters once you add the repeat loop in Step 4. The automations guide explains modes in more detail.

Step 3: Make the notification loud

A normal notification can sit silently on a locked, muted phone. The Companion app documentation describes how to override that. On iOS, a critical notification appears at the top of the lock screen and plays a sound even when Do Not Disturb is on or the phone is muted. On Android, setting ttl: 0 and priority: high makes the notification show immediately and ring, and adding channel: alarm_stream plays it through the alarm volume, which sounds even in vibrate or silent mode.

Replace the notify action in Step 2 with the block for your phone. For an iPhone:

  - action: notify.mobile_app_your_iphone
    data:
      title: "Water leak detected"
      message: "{{ trigger.to_state.name }} is reporting water."
      data:
        tag: water-leak
        push:
          sound:
            name: default
            critical: 1
            volume: 1.0

For an Android phone:

  - action: notify.mobile_app_your_android
    data:
      title: "Water leak detected"
      message: "{{ trigger.to_state.name }} is reporting water."
      data:
        tag: water-leak
        ttl: 0
        priority: high
        channel: alarm_stream

If your household has both kinds of phone, use one action per device rather than trying to merge the blocks. On iOS you may be asked to allow critical alerts in the app's notification settings the first time, so run a test now rather than discovering that at 3am. Use this level of noise only for leaks and similar emergencies; if everything is critical, people start ignoring it.

Step 4: Repeat the alert until the floor is dry

One alert is easy to miss or swipe away. A repeat loop with a while condition keeps nagging until the sensor reads off again, which happens when the probes dry out or you mop up. Wrap the notify action like this, using the entity that fired the trigger:

actions:
  - repeat:
      while:
        - condition: template
          value_template: "{{ is_state(trigger.entity_id, 'on') }}"
        - condition: template
          value_template: "{{ repeat.index <= 10 }}"
      sequence:
        - action: notify.mobile_app_your_iphone
          data:
            title: "Water leak still detected"
            message: "{{ trigger.to_state.name }} is still wet."
            data:
              tag: water-leak
              push:
                sound:
                  name: default
                  critical: 1
        - delay: "00:02:00"

The cap of ten repeats stops an endless loop if a sensor sticks on, so you get roughly twenty minutes of reminders. Reusing the same tag means each new message replaces the previous one on your phone instead of stacking. Because the loop checks trigger.entity_id, it works for whichever sensor fired, and parallel mode lets two leaks run side by side.

Step 5: Alert everyone and, optionally, close the water

A leak while you are at work is a problem for whoever is home. Create a notify group under Settings → Devices & services → Helpers (the Group helper's Notify group option) containing each person's mobile app, then use the group's action name in place of notify.mobile_app_your_iphone. Adding a second action that announces the room on a smart speaker is useful for anyone without the app.

If you have a motorised shut-off valve, the same automation can close it. Home Assistant provides a valve.close_valve action for entities in the valve domain; older integrations may expose the valve as a switch, in which case use switch.turn_off or switch.turn_on according to how it behaves. Put it as the first action so the water stops before the notifications go out:

  - action: valve.close_valve
    target:
      entity_id: valve.main_water

Think carefully before automating this. A valve that closes on a false alarm will cut off water to the whole house, and a valve left closed for months can seize. Our smart water shut-off valve guide covers hardware options and installation considerations, and a plumber should fit anything on the mains supply. A closed valve also does not replace your manual stop tap, so know where that is.

Step 6: Get warned when a sensor stops responding

A leak sensor that has quietly died protects nothing. Battery sensors sit unattended for years in damp, cold places, which are the worst conditions for batteries and radio links. Add a second automation that fires if any sensor has been unavailable for a few hours:

alias: Leak sensor offline
triggers:
  - trigger: state
    entity_id:
      - binary_sensor.kitchen_leak
      - binary_sensor.utility_leak
    to: "unavailable"
    for: "06:00:00"
actions:
  - action: notify.mobile_app_your_phone
    data:
      title: "Leak sensor offline"
      message: "{{ trigger.to_state.name }} has been unavailable for 6 hours."

The state trigger's for option means the sensor must stay in that state for the whole period. The Home Assistant documentation notes that the timer resets if Home Assistant restarts or automations reload, so a restart can delay this warning by up to the full period. Pair it with the low battery alerts guide so a flat battery is flagged before the sensor goes offline altogether.

Step 7: Test the whole chain

Do not trust it until you have watched it fire. Touch a damp paper towel to each sensor in turn and check four things: the notification arrives, it sounds with the phone muted, it repeats, and it stops after you dry the probes. If you added a valve, test that with the water supply isolated or with the valve safe to operate, and confirm the valve reopens when you want it to, because the automation above only closes it.

Each automation's Traces tab shows exactly which trigger fired and where a run stopped, which is the fastest way to debug silence. Repeat the test every few months; put a reminder in your calendar, because a stuck sensor or a changed notify service name is the sort of thing you only find out about during a real leak.

Why did my leak alert not fire? Common problems and fixes

The usual cause is that the sensor never reached Home Assistant in the first place, so check the sensor's state in Developer tools → States before blaming the automation.

The state never changes to on: the probes may not be touching the water, or a wired probe is unplugged. Some sensors need a conductive film of water across both contacts, so a single drip may not register. Test with a saucer of water.

The sensor shows unavailable: check the battery first, then the radio link. A metal cabinet under a sink can weaken a Zigbee signal; move the sensor body outside the cabinet and run a probe cable in.

The notification arrives silently: you are using the plain action rather than the critical or alarm-stream version, or iOS critical alerts are not allowed in the Companion app's notification settings.

No notification arrives: run the notify action on its own from Developer tools → Actions. If it fails, the notify.mobile_app_ name is wrong. The notifications guide covers the basics.

It fires when nothing is wet: condensation or a cold pipe can trigger some sensors. Move the sensor off the pipe and onto the floor.

What should you do when the leak alarm goes off?

Turn the water off at the stop tap first, then find the source. WaterSafe says the internal stop tap is usually under the kitchen sink, with other common places including a downstairs bathroom or toilet, a garage or utility room, a cellar or under the stairs. Turning it clockwise closes it, anticlockwise reopens it, and it should be operated slowly without forcing, because over-tightening can damage it. WaterSafe also advises checking it works regularly, so you are not trying it for the first time in an emergency.

Thames Water adds that you should always have a working inside stop valve and use it as your main way to turn the water on and off, with the outside valve kept for emergencies on the supply pipe. If the leak is near electrics, switch those off at the consumer unit only if it is safe to reach, and call an approved plumber. A leak alert gets you there in minutes instead of hours; it does not fix the pipe.

Once this is working, the same pattern protects other risks: see the frost alert for frozen pipes for the cold-weather version of the same problem.

Buy the picks in this guide

Recommended for Home Automation

See all devices →

Frequently asked questions

How do I get a notification when a water leak sensor is triggered in Home Assistant?
Create an automation with a state trigger on the leak sensor's binary sensor entity, set to on, and a notify action that sends a message through the Companion app. The sensor's moisture device class reports on when water is detected and off when it is dry, so the trigger fires the moment the probes get wet. Use trigger.to_state.name in the message to say which sensor fired. For something you will actually notice, add the critical notification settings for iOS or the alarm stream channel for Android so the alert sounds even when the phone is muted. Always test it by touching a damp paper towel to the probes before you rely on it, and repeat the test every few months.
Can Home Assistant turn the water off automatically when it detects a leak?
Yes, if you have a motorised shut-off valve that Home Assistant can control. Add a valve.close_valve action to the leak automation, or switch.turn_off if the valve appears as a switch, and place it before the notification so the water stops first. The catch is risk: a false alarm will cut water to the whole home, and a valve that is rarely operated can seize, so exercise it periodically. Mains-supply valves should be fitted by a plumber. Automatic shut-off also does not replace knowing where your manual stop tap is. Many people start with alerts only, then add the valve once they trust the sensors over a few months of normal use.
What happens if my leak sensor battery dies?
It stops reporting, and you get no alert when water appears, which is the biggest hidden risk of any leak system. The sensor usually shows as unavailable in Home Assistant once it drops off the network. Build a second automation with a state trigger on unavailable and a for period of several hours, which messages you when a sensor has been offline for that long. Combine it with a low battery alert so you are warned before the battery fails. Be aware the for timer resets if Home Assistant restarts or automations reload, so a restart can delay the warning. Checking each sensor by hand every few months is still sensible, especially in cold or damp locations.
Where is the best place to put a water leak sensor?
Put it flat on the floor at the lowest point near the likely source, with the probes touching the surface. Good spots are beside a washing machine or dishwasher, under the kitchen sink, behind a toilet, next to a boiler or hot water cylinder, and near a loft header tank. Water collects at the lowest point, so a sensor on a shelf only triggers once the leak is serious. Under a metal-bodied sink cabinet, radio signals can be weak, so consider a sensor with a wired probe so the main body can sit where the signal is stronger. Check each location is within range of your Zigbee or Thread mesh before sticking it down.

Sources

Sources verified 2026-11-16

  1. Home Assistant — Binary sensor integration (moisture device class)
  2. Home Assistant — State trigger
  3. Home Assistant — Valve integration
  4. Home Assistant Companion — Critical notifications
  5. WaterSafe — How can I locate my internal stop tap to turn off my water in an emergency?
  6. Thames Water — How to turn your water off and on
›How we researched this

Claims in this article are checked against primary sources — manufacturer specifications, official documentation, Which? research, Ofgem guidance, or gov.uk — rather than forum threads or video reviews. Where the author has direct hands-on experience with a product (most Home Assistant, Zigbee, and home-networking gear is running in his own homelab), that is stated explicitly in the text.

For categories outside that personal setup — such as boilers, heat pumps, and other areas that are traditionally a heating engineer's domain — verdicts are built from cross-referenced manufacturer data, published lab results, and vetted expert and owner reviews rather than a claim of personal hands-on testing. See the editorial policy for the full methodology.

Sepehr

Written by

Sepehr

10+ years hands-on with Home Assistant & networking · Research-backed elsewhere · No brand deals

Smart home specialist with 10+ years running a self-hosted Home Assistant setup — Zigbee2MQTT, Frigate NVR, and local-first automations. Independent coverage for UK homes, no brand deals.

LinkedIn →

Citing this page? Please use a dofollow link back to the original article — it helps us keep the data on this page accurate and up to date.

Related reading