home-assistant
Setting Up Aqara Water Leak Sensors with Home Assistant
Complete guide to deploying Aqara Water Leak Sensors across your home with Home Assistant automations for leak detection and auto-shutoff.
Prerequisites
- Home Assistant 2024.1 or later installed and running
- Zigbee coordinator (e.g., SONOFF Zigbee Dongle Plus-E or SkyConnect)
- ZHA or Zigbee2MQTT integration configured
- Aqara Water Leak Sensor(s) with batteries inserted
Step 1: Plan Your Deployment
Place sensors at every potential water leak point:
- Under kitchen sink
- Under bathroom sinks
- Behind toilets
- Under washing machine
- Under dishwasher
- Near water heater
- In basement/crawl space
- Under refrigerator (if it has a water line)
Step 2: Pair Each Sensor
- Press and hold the reset button on the sensor for 5 seconds until the LED flashes
- In Home Assistant, go to Settings > Devices & Services > ZHA > Add Device
- The sensor should appear within 30 seconds
- Rename it descriptively (e.g., “Kitchen Sink Leak Sensor”)
- Repeat for each sensor
Step 3: Create a Sensor Group
Group all leak sensors for easy monitoring:
# configuration.yaml
binary_sensor:
- platform: group
name: "All Water Leak Sensors"
unique_id: all_water_leak_sensors
device_class: moisture
entities:
- binary_sensor.kitchen_sink_leak
- binary_sensor.bathroom_sink_leak
- binary_sensor.washing_machine_leak
- binary_sensor.water_heater_leak
Step 4: Create Critical Alert Automation
automation:
- alias: "Water leak critical alert"
trigger:
- platform: state
entity_id: binary_sensor.all_water_leak_sensors
to: "on"
action:
- service: notify.mobile_app
data:
title: "WATER LEAK DETECTED"
message: >
Water detected at {{ trigger.to_state.attributes.friendly_name }}.
Check immediately!
data:
priority: high
push:
sound:
name: default
critical: 1
volume: 1.0
- service: tts.speak
target:
entity_id: tts.google_en
data:
message: "Warning! Water leak detected!"
media_player_entity_id: media_player.living_room_speaker
Step 5: Add Auto-Shutoff (Optional)
If you have a smart water valve (Zigbee or Z-Wave), add auto-shutoff:
automation:
- alias: "Auto shutoff water on leak"
trigger:
- platform: state
entity_id: binary_sensor.all_water_leak_sensors
to: "on"
action:
- service: switch.turn_off
target:
entity_id: switch.main_water_valve
- service: notify.mobile_app
data:
title: "WATER SHUTOFF ACTIVATED"
message: "Leak detected. Main water valve has been automatically closed."
Step 6: Dashboard Card
Add a monitoring card to your dashboard:
type: entities
title: Water Leak Monitoring
entities:
- entity: binary_sensor.kitchen_sink_leak
- entity: binary_sensor.bathroom_sink_leak
- entity: binary_sensor.washing_machine_leak
- entity: binary_sensor.water_heater_leak
Troubleshooting
Sensor shows unavailable: Check battery level and Zigbee mesh coverage. Water leak sensors are often placed in low, enclosed spaces with poor signal. Add Zigbee router devices nearby.
False triggers: Condensation on cold pipes can trigger the sensor. Elevate the sensor slightly on a small platform if placed near cold water pipes in humid environments.
Battery level not updating: Battery reports are sent infrequently. Trigger a report by pressing the reset button briefly.