---
title: "The cheapest useful automation: a leak sensor for under €20 against a flood costing thousands"
description: "A Zigbee leak sensor on the floor under the washing machine, the water heater or the sink and a notification on the phone. A small price for something that warns you before the water has reached the neighbours."
canonical: "https://realhomeautomations.com/en/projects/leak-sensor-cheapest-useful-automation/"
language: en-US
updated: 2026-11-25T15:20:34+00:00
---

# The cheapest useful automation: a leak sensor for under €20 against a flood costing thousands

A Zigbee leak sensor on the floor under the washing machine, the water heater or the sink and a notification on the phone. A small price for something that warns you before the water has reached the neighbours.

> Canonical HTML page: https://realhomeautomations.com/en/projects/leak-sensor-cheapest-useful-automation/

- **Difficulty:** Beginner
- **Build time:** 20–45 minutes
- **Reading time:** 2 minutes

## Tools required

- Leak sensor (Sonoff SNZB-05P with a sensing cable, 1 pc)
- Zigbee hub or adapter (or Home Assistant with a Zigbee adapter; not included in the product)
- Home Assistant (with the Zigbee integration (ZHA) or Zigbee2MQTT)
- Phone with the Home Assistant app (for the notification)


## What readers will learn

- To choose where to put the sensor
- To make a leak notification
- To test the sensor safely
- To know what it doesn't do: it doesn't stop the water


## Skill requirements

- To add a Zigbee device in Home Assistant
- To paste YAML into an automation

## Project kit

- [Flood sensor Sonoff SNZB-05P, with flood detection cable included](https://realhomeautomations.com/en/product/flood-sensor-sonoff-snzb-05p-with-flood-detection-cable-included/index.md)

A leak from a washing machine hose, from the water heater or under the sink starts with a few drops. A sensor on the floor catches the moisture at the first stage and writes to your phone. This is one of the most useful automations and among the cheapest.

 ## What you will get

 A notification when the sensor senses water. The sensor only **notifies**. It doesn't stop the water and doesn't dry the floor.

 ## What we need

- 1 pc [Sonoff SNZB-05P](https://realhomeautomations.com/bg/produkt/flood-sensor-sonoff-snzb-05p-with-flood-detection-cable-included/): a Zigbee 3.0 leak sensor, with the sensing cable included. For more places you need more sensors.
- A working Home Assistant and a phone with the Home Assistant app.

 You need a Zigbee hub or Home Assistant with a Zigbee adapter.

 The hub or adapter is not included in the product. Setup time: 20–45 minutes. No electrical installation is touched.

 ## How it works

 When the sensor senses water, Home Assistant receives `binary_sensor` with the state `on` (class "moisture"). The automation sends a notification immediately. In the dry state the entity is `off`.

 Simeon's notification is critical, and when the sensor is dry again a second one says that everything is OK.

 ## Where to put it

- under the washing machine or the dishwasher, at the lowest point;
- next to the water heater and under the sink;
- behind the toilet and under a radiator with valves, if there is a risk;
- in a place where the water will arrive first, before it spills elsewhere.

 Leave the sensor on a level floor. The sensing cable goes where water collects.

 ## Steps

- Pair the sensor in Home Assistant. You expect `binary_sensor` for moisture.
- Place it in the chosen spot.
- Automation (the entity ID is an example):

 ```
alias: Leak - notification
mode: single
triggers:
  - trigger: state
    entity_id: binary_sensor.leak_kitchen
    to: "on"
actions:
  - action: notify.mobile_app_your_phone
    data:
      title: Leak!
      message: The sensor by the sink has sensed water. Check immediately.
      data:
        ttl: 0
        priority: high
```

- Save and try it.

 ## Checking the result

- Lightly wet the cable or the sensor's contacts with a damp cloth. Don't immerse it. A notification should come.
- Dry it and check that the entity returns to `off`.
- Repeat the check every few months and replace the battery on time.

 ## If it doesn't work

- No notification comes → the name of the `notify` is wrong or notifications are off → send a test one from Developer tools.
- The sensor is `unavailable` → weak signal or battery → move the hub or replace the battery.
- False alarms → condensation or a damp floor → move the sensor or dry it.

 ## Limitations

- The sensor catches water only where it is placed.
- If you are not at home and the phone has no connection, a notification doesn't help. Think of someone who can respond.
- The automation doesn't stop the water.

 ## Sources and verification status

 Checked against the documentation on 22.11.2026.

- [Home Assistant: State trigger](https://www.home-assistant.io/docs/automation/trigger/#state-trigger)
- [Home Assistant: Binary sensor (moisture)](https://www.home-assistant.io/integrations/binary_sensor/)
- [Home Assistant Companion: notifications](https://companion.home-assistant.io/docs/notifications/notifications-basic/)