After a router reboot or a power blip, Home Assistant comes back first and a dozen sleepy sensors stay unavailable for a while. Paging once per entity is noise. This workflow waits for a schedule (or a dashboard button), builds one list of offline sensors, binary sensors, and switches, then sends a single phone notification and a matching persistent notice you can dismiss from the UI.
Entity ids stay in blueprint inputs. Do not publish a live house’s device dump.
Pairs with low battery alerts — that pack watches percent remaining; this one watches entities that never came back at all.
What problem it solves
You want a triage list after an outage — what is still unavailable or unknown — without a push for every flicker, and without scanning Developer Tools by hand.
How it works
- Schedule or button — a time trigger (hourly or a daily morning run) or an
input_buttonon a dashboard starts a scan. Disabled entities are skipped; they are not loaded. - Domain window — the scan looks at
sensor,binary_sensor, andswitch. Climate, lights, media players, helpers, and cameras stay out so a paused TV or an idleinput_booleandoes not pad the list. - Include / exclude — pick entities to always include, entities to always skip, hide-hidden, skip Home Assistant Cloud stubs, and match name fragments (plain text or a regular expression). A sleepy reed that is supposed to be offline between wakeups belongs on the exclude list.
- Dwell — an entity must sit in
unavailableorunknownfor a wait you pick so a Zigbee interview or a Wi-Fi reconnect does not land on the report. - One grouped notify — if the filtered list is non-empty, send Companion (or any notify service) a single message with the count and a bulleted friendly-name list, plus
persistent_notification.createwith a stablenotification_idso a later run replaces the card instead of stacking. Optional: an “all clear” push when the list is empty.
A live-log mode in the pack can write newly-offline entities to the Logbook while you are debugging; it does not send the phone report.
Hardware notes
- No extra sensors. This is YAML and a notify service on top of devices you already have.
- Notify. Companion is the usual target (
notify.mobile_app_your_phone). Persistent notification covers the desktop UI when the phone is in another room. - Sleepy battery nodes. Deep-sleep ESP32 contacts look unavailable between wakeups. Exclude those entities here; use low battery alerts and the battery reed door sensor pack for voltage instead of “offline.”
Snippet
The pack ships a blueprint. Inputs replace real entity ids:
trigger:
- platform: time
at: !input report_time
id: scheduled
- platform: state
entity_id: !input run_button
id: manual
action:
- variables:
offline: >
{{ states.sensor | list
+ states.binary_sensor | list
+ states.switch | list }}
# filter unavailable/unknown, apply include/exclude, then:
- if:
- condition: template
value_template: "{{ offline_names | count > 0 }}"
then:
- service: notify.notify
data:
title: "Offline devices"
message: "{{ offline_count }} unavailable — {{ offline_names }}"
- service: persistent_notification.create
data:
notification_id: offline_devices_report
title: "Offline devices"
message: "{{ offline_names }}"
# all-clear branch + full filters: blueprint in the pack
Setup outline
- Decide hourly (post-outage watch) vs daily (morning triage). Create the optional
input_buttonif you want a dashboard run. - Import the blueprint. Fill the notify service, schedule, dwell, and exclude list. Start with no includes so the first run shows the real inventory.
- Run it once from the button. Expect a long first list — cloud STT, unused switches, and hidden diagnostics are the usual junk.
- Add excludes (or hide those entities in HA and turn on “exclude hidden”). Re-run until the list is the devices you would actually walk over to.
Troubleshooting
- Empty notify with “issues” enabled. Excludes ate everything, or the dwell is longer than the entities stay down. Clear excludes and drop the wait to confirm the scan sees any unavailable entity.
- Report never fires on the clock. Time trigger is in HA’s timezone, not the phone’s. Check Settings → System → General, then the automation trace at the scheduled minute.
- Sleepy reeds every run. Those contacts are meant to disappear between GPIO wakeups. Exclude the binary sensor (and its battery entity if it goes unknown in sleep).
- Template loop / huge list. A template sensor that itself lists unavailable entities will re-enter the scan. Exclude template helpers that summarize the same states.
Credits
Based on the community blueprint Offline Devices Report — includes, excludes, and notifications. This write-up is an original overview of the grouped post-outage scan pattern.