Sensor House
Sensor watchdog recipe
The failure nobody notices: a sensor whose battery died or that dropped off the network, so it can no longer warn you.
The failure nobody notices: a sensor whose battery died or that dropped off the network, so it can no longer warn you. Nowhere: it watches the other sensors. Add every leak, freeze and humidity sensor you own. In Home Assistant it shows up as a any entity, plus sensor, device class battery. When the sensor stays unavailable for 24 hours or its battery drops below 20 percent, tell you to check it. A dead sensor raises no alarm of its own: it just stops reporting, and Home Assistant marks it unavailable. This recipe watches for exactly that, for 24 hours, the same window the editor's house uses, and for a battery under 20 percent, which is this site's choice.
What it catches
The failure nobody notices: a sensor whose battery died or that dropped off the network, so it can no longer warn you.
Where it goes
Nowhere: it watches the other sensors. Add every leak, freeze and humidity sensor you own.
How it shows up in Home Assistant
As a any entity, plus sensor, device class battery. Any sensor Home Assistant already shows works: the recipe only reads the entity, whatever radio is underneath.
Why the recipe looks like this
A dead sensor raises no alarm of its own: it just stops reporting, and Home Assistant marks it unavailable. This recipe watches for exactly that, for 24 hours, the same window the editor's house uses, and for a battery under 20 percent, which is this site's choice.
Write it for your sensor
Runs in your browser. Nothing you type is sent.
Sensor watchdog. When the sensor stays unavailable for 24 hours or its battery drops below 20 percent, tell you to check it.
automations.yaml
- alias: "Watch: a sensor needs attention"
mode: queued
triggers:
- trigger: state
entity_id: binary_sensor.water_heater_leak
to: "unavailable"
for:
hours: 24
- trigger: numeric_state
entity_id: sensor.water_heater_leak_battery
below: 20
actions:
- action: notify.mobile_app_your_phone
data:
title: "A sensor needs attention"
message: "{% if trigger.to_state.state == \"unavailable\" %}{{ trigger.to_state.name }} has not reported for a while. Check it.{% else %}{{ trigger.to_state.name }} is at {{ trigger.to_state.state }} percent. Change the battery.{% endif %}"
Rename the entities to your own, then paste. Syntax: Home Assistant: Automation triggers.
Sources
Drafted with a language model on October 26, 2026 from the sources listed above. Every recipe on the page is written by the site's own code and parsed by a test. The editor samples pages after they publish; nothing here is advice from a licensed electrician or plumber.
Found an error? See Corrections.