The IKEA Badring is a small Zigbee moisture sensor with two metal prongs and one AAA cell. It beeps on its own when both prongs are wet, and it shows up in Home Assistant as a moisture binary sensor. The beep in the room is useless when nobody is home. The phone notification has to be the kind that still makes a sound when the ringer is off.
The second half of the pack is the part owners discover the next morning. The sensor is reliable at saying “wet.” The “dry” message often never arrives, on ZHA and on Zigbee2MQTT, so the binary stays on after the prongs have dried and every siren automation you attached to it stays latched. On ZHA, zha_toolkit can ask the device for a fresh zone status while it is wet. When the device answers dry, the binary goes off and this pack sends a cleared message.
Entity ids are blueprint inputs (binary_sensor.leak). Do not publish which fixture a sensor sits under, and do not paste a Zigbee address into the YAML. zha_toolkit accepts the binary sensor entity and resolves the device itself.
A whole-house meter that never stops spinning is ESP32-C6 water meter. This pack is one puddle at the prongs. Quiet-hours notification hub already lets a critical priority through. If your other automations call that hub, call it from this one with critical priority. If they do not, the blueprint talks to Companion directly with the critical payload. Nagging repeatable alert is the generic repeat loop. The repeat here is tied to this moisture sensor and this poll.
What problem it solves
You want a leak under a sink, a water heater, or a washing machine to wake a phone immediately, and you want the alarm to clear after the sensor is actually dry.
How it works
- Wet — the moisture binary changes to
on. The blueprint sends the critical notification at once. On iOS, Companion’s critical sound plays at the volume you set and is allowed through Focus and a muted ringer, after you have granted Critical Alerts to the app. On Android,priority: highandttl: 0deliver it immediately, and the alarm channel is what still rings a phone that is on vibrate. An optional email action is a second path for a phone that is off. - Repeat — while the binary stays
on, the same alert can fire again on an interval (pack default 5 minutes). Clear the interval input to send once. A persistent notification stays in the Home Assistant sidebar until the clear step dismisses it. - Ask again, on ZHA — after a short delay, and again on that same interval, the blueprint calls
zha_toolkit.attr_readfor the moisture entity. The read is IAS Zone (cluster 1280), zone status (attribute 2), with the cache bypassed and several tries so a sleepy end device gets more than one request. The ieee field is the entity id from the blueprint input. The integration looks up the device. When a read comes back dry, ZHA updates the binary tooff. - Already wet at startup — a
homeassistant.starttrigger enters the same loop if the binary is alreadyon, so a restart in the middle of a leak does not wait for a new edge. - Cleared — a state trigger from
ontooffstops the repeat, dismisses the persistent notification, and sends an ordinary “dry” message. That message is not critical. A transition fromunavailabletooffis a radio reconnect, and it does not send the dry message. Onlyontooffdoes. - Zigbee2MQTT — the alert, the repeat, and the clear-on-real-edge steps are the same. The poll action is ZHA. Leave the poll input off on Zigbee2MQTT. A Badring that stays
onafter the prongs are dry is a device habit on both integrations. The poll is the ZHA workaround. If the device itself is still beeping with dry prongs, a brief second touch of both prongs is what owners use to make the sensor emit a new event. Do that after the poll has had a few minutes, and only if the binary never moves.
Pair the sensor close to the coordinator or a router, in the spot where it will live. Wake it during join (a damp finger on the prongs is enough) so ZHA can finish attribute reporting while the device is awake. The pairing button is four presses within five seconds.
Hardware notes
- Sensor. IKEA BADRING, model E2202. One AAA cell. IKEA’s manual specifies an HR03. The prongs are on the underside. The silicone feet are there so you do not tape over the water path. Indoor, roughly 0 °C to 40 °C.
- Coordinator. ZHA if you want the dry poll. Zigbee2MQTT if you only want the alert. zha_toolkit is a HACS integration and it talks to ZHA.
- Phone. Companion, with notification permission. iOS critical alerts are a separate permission. Until that permission is on, the push arrives as a normal notification and Focus will hide it.
- Where it sits. Flat, prongs down, where a leak would actually pool. A sensor on a dry windowsill will not see water on the floor.
Snippet
The pack ships a blueprint. This is the notify plus the ZHA read. Inputs replace the sensor and the phone.
mode: restart
trigger:
- platform: state
entity_id: !input leak_sensor
to: "on"
id: wet
- platform: state
entity_id: !input leak_sensor
from: "on"
to: "off"
id: dry
action:
- choose:
- conditions:
- condition: trigger
id: wet
sequence:
- action: notify.send_message
target:
entity_id: !input notify_target
data:
title: "Water leak"
message: "A leak sensor is wet."
data:
push:
sound:
name: default
critical: 1
volume: 1.0
ttl: 0
priority: high
channel: alarm_stream
- action: zha_toolkit.attr_read
data:
ieee: !input leak_sensor
cluster: 1280
attribute: 2
use_cache: false
tries: 50
The repeat, the start-up check, the email action, and the dry message are in the full blueprint. Turn the zha_toolkit.attr_read step off when the sensor is on Zigbee2MQTT. ieee is the moisture entity id, not a hand-written device address.
Setup outline
- Pair the Badring. Four presses of the pairing button within five seconds. Keep it awake during the interview. Reload ZHA if the device appears only after a reload, then press Reconfigure once while it is awake so reports are actually set.
- Install zha_toolkit if you are on ZHA. Import the blueprint. Select the moisture binary, the notify target, and the repeat interval.
- Wet the prongs over a sink. Confirm the local beep, the critical push, and
onin Developer Tools. Dry the prongs. On ZHA, confirm that within a couple of poll intervals the binary returns tooffand the cleared message arrives once. - Grant Critical Alerts on iOS, or confirm the Android alarm channel is allowed to bypass Do Not Disturb. Send the wet test again with the phone locked and the ringer off.
- Put the sensor in its spot. Run the wet test there once, so you know the mesh reaches.
Troubleshooting
- The push is silent overnight. Critical Alerts permission is off, or the Android channel is a normal channel. The payload in the snippet is necessary and it is not sufficient. The phone has to allow it.
- The binary stays on after the prongs are dry. On ZHA, confirm zha_toolkit is installed and the poll step is running in the automation trace. A trace that errors on
attr_readis usually the toolkit missing, or the entity pointing at a device ZHA does not own. Give it several intervals. If the sensor itself is still beeping, dry it and briefly bridge the prongs again so it emits a new event. - “Dry” arrives when you restart Home Assistant. The clear trigger is matching
unavailabletooff. The pack requiresfrom: "on". A reconnect is not a cleared leak. - Join never finishes. The device went to sleep during the interview. Wake it with a damp touch on the prongs and run Reconfigure. Pair it next to the coordinator, then move it.
- Battery shows nothing, or a stuck zero. Reporting was not written at join. Reconfigure while the sensor is awake. A cell that cannot beep in a bowl of water is a dead cell. The manual’s low-battery signal is the red LED blinking three times.
- Every sink in the house is in the message. The blueprint message is a fixed sentence plus the entity’s friendly name. Name the entity for the fixture in Home Assistant. Keep that name out of anything you publish.
Credits
The critical phone alert and the email path follow IKEA Badring Water leakage sensor, smart by Piotr Wrzecionowski. iOS and Android delivery follow Home Assistant Companion’s critical notifications. The ZHA dry poll follows Flood Alarm Reset for IKEA BADRING with ZHA by Merikei, which uses zha-toolkit. This write-up is an original overview of the critical alert plus that poll, with a clear step that only runs on a real on-to-off transition.