Skip to content

Know When an Important Home Assistant Sensor Goes Unavailable

A sensor remains unavailable for ten minutes, creates a notification, then recovers and clears it.

A freezer temperature sensor is only helpful if you know when it stops reporting. When a sensor loses its connection, Home Assistant may show unavailable or unknown. This guide builds a monitor for one entity: after a sustained outage it shows one notice in Home Assistant, and removes that notice when the entity reports a usable state again.

The monitor checks every minute as well as on state changes and startup. A 10-minute wait filters brief interruptions. The notice is in Home Assistant’s Notifications panel; this example does not send a phone push.

Free Relay. Home Assistant, wherever you are. 5 entities free. No port forwarding. Try free.

What you need

  • Home Assistant Core 2026.11.0 or later, on any installation type, with access to the automation editor. The example follows the 2026.11 documentation.
  • One existing entity whose integration actually reports unavailable or unknown during the failure you want to monitor. Find its entity ID under Settings → Devices & services → Entities.
  • Permission to create automations and read Home Assistant notifications. No extra integration or hardware is required.

This is a status monitor, not a safety alarm: it cannot notify you while Home Assistant itself is stopped. It cannot detect a frozen sensor that keeps displaying an old normal value. An absent or misspelled entity is not reliably reported; verify the entity exists first.

1. Create the automation

  1. Go to Settings → Automations & scenes → Automations → Create automation → Create new automation.
  2. Open the editor’s menu and choose Edit in YAML. Replace its contents with the complete example below.
  3. Replace sensor.example_temperature in all four places with your entity ID. The last occurrence is explanatory message text; keeping it accurate helps identify the problem. Keep the two notification_id values identical.
  4. Save and make sure the automation is enabled.

2. Understand the timing

Why check on a schedule as well as on state changes? A state change lets the notice clear promptly when the sensor recovers; the minute check revisits a long outage after startup or an automation reload. The 10-minute condition filters short dropouts, and the shared notification ID keeps repeated checks from stacking notices.

When the entity has been continuously unknown or unavailable for 10 minutes, the next minute check creates the notification. A change from unknown to unavailable starts the 10-minute check again. When the state is neither of those, a state change triggers dismissal; the next minute check provides another opportunity to clear it.

The same notification ID is reused, so checks replace the existing notice instead of accumulating copies. If someone dismisses it while the entity remains unavailable, the next check can create it again. Updates to a notification can themselves trigger other automations, so do not treat each update as a new outage.

After a restart, Home Assistant may count the entity’s state duration from startup, so the notice can take another 10–11 minutes. An automation reload or a brief outage can also change when you see it. Home Assistant documents the state condition and duration, time pattern trigger, and notification ID behavior.

3. Test without disconnecting a device

I checked the YAML and walked through the decisions offline. I haven’t run this exact automation in Home Assistant or tested it with a physical sensor, so try it on your own installation before relying on it:

  1. Create a test Dropdown helper under Settings → Devices & services → Helpers, with options ready, unavailable, and unknown. Set it to ready and note its entity ID, for example input_select.availability_test.
  2. Temporarily use that helper ID in all four places in the automation. Save, then select unavailable on the helper. Before 10 minutes there should be no new notice; after 10–11 minutes check Notifications for “Important sensor needs attention.”
  3. Keep it unavailable for another two checks: there should still be one notice with that ID. Select ready; the notice should disappear. Repeat with unknown.
  4. For restart behavior, leave the test helper unavailable, restart Home Assistant at a convenient time, and allow another 10–11 minutes. Confirm the notice appears again. Then set it to ready, return the automation to the real entity ID, and delete the test helper if no longer needed.

For a shorter trial, temporarily change 00:10:00 to 00:01:00; restore 10 minutes before monitoring a real device. Do not use the automation’s Run action as the only test: it bypasses normal trigger timing.

Optional: send the notice to your phone

You can keep the dashboard notice and add a separate automation to forward it when it is first created. Install and sign in to the Home Assistant Companion app on your phone and allow notifications. In Home Assistant, go to Settings → Automations & scenes → Automations → Create automation → Create new automation, then choose Edit in YAML and paste:

Replace notify.mobile_app_your_phone with the phone’s actual notification action, which you can find under Developer Tools → Actions by searching for notify.mobile_app_. Keep the notification ID the same as in the monitoring automation. Save and enable both automations, then use the test helper above to confirm the phone receives a message when the dashboard notice first appears.

The added trigger ignores the monitor’s minute-by-minute updates to an existing notice. If you manually dismiss the notice while the sensor is still unavailable, the monitor can create it again and send another push. A notice already present when the forwarding automation starts does not cause a new push; Home Assistant or phone connectivity and notification permissions also affect delivery. See the persistent notification trigger documentation.

Watch more than one sensor

Duplicate the monitoring automation for each additional sensor, replace that sensor’s entity ID in all four places, and give each copy its own notification ID in both actions. For phone forwarding, duplicate the optional automation too and match its trigger to the new ID. Each sensor then has a separate notice.

Troubleshooting and removal

  • No notice: Confirm the exact ID and current state in Developer Tools → States; ensure the entity has stayed in the same bad state long enough. Check that the automation is enabled and inspect its trace and Settings → System → Logs.
  • Too many notices: Use the same ID in create and dismiss. For another monitored entity, duplicate the automation and give the copy a different ID in both places.
  • Notice remains: Check the entity’s current state and the automation trace. A recovered value can still be stale; this monitor checks availability, not freshness or accuracy.
  • Remove it: Disable or delete the automation and dismiss its notice in Home Assistant’s Notifications panel. Removing this monitor does not alter the device or integration.

Readers have raised the related problem of devices becoming unresponsive. For more on restart behavior, see Home Assistant’s automation troubleshooting guide. For another restart-aware example, see Restart-Safe Timed Switch.

Leave a Reply