# Smart home entity health cockpit for Home Assistant

> Open one screen to find every unavailable, stale, or low-battery device in your smart home, see which hub is really at fault, and clear out the dead entries in bulk.

- Workflow type: app
- Services: Home Assistant, Notion
- Categories: Operations, Personal Productivity
- Published: 2026-08-24

## What it does

- Pulls every entity from your Home Assistant setup into one sortable table, grouped by the integration that owns it and by the area it lives in, so a single dead hub shows up as one cluster instead of forty unrelated problems.
- Gives you three triage tabs: things that are currently unavailable or unknown, things that have gone quiet for longer than the number of days you pick, and battery devices under the percentage you set.
- Opens a detail panel on any device showing its recent state changes, with every timestamp in your own local time.
- Clears out dead entries in bulk behind a confirmation step, and refuses to offer up anything that has reported in during the last 24 hours.
- Adds a Diagnose this device button that sends a background agent to compare the device against its neighbours, decide whether it looks like a flat battery, a flaky radio or hub, or a device that was physically removed, then writes a plain-language verdict into the app and files it in your Notion notes.

## What you'll need

- A Home Assistant setup you can reach from the internet or your network, plus an access token from your Home Assistant profile page
- A Notion workspace with a database for home ops notes, shared with your connection so new pages can be filed there
- Some idea of how many days of silence counts as stale for your setup, and what battery percentage you want flagged

## Prompt

Build me a smart home entity health cockpit: an app I open whenever my Home Assistant setup feels flaky, so I can find everything that is broken, silent, or running flat, and clean it up in one sitting.

The main view is a single sortable table of every entity in my setup, loaded with Home Assistant's List States. Group it by integration first and by area second. Integration comes first on purpose, because one dead hub or bridge usually explains dozens of broken entities at once, and I want that to be obvious at a glance instead of looking like forty separate faults. Each row shows the entity name, its entity id, the integration that owns it, its area, the current state, and a last-seen timestamp. Show every timestamp in my local timezone, never in UTC. Let me sort by any column and collapse or expand each group, and show a count of problem entities on each group header so a fully dead integration jumps out.

Above the table put three filter tabs, which are the buckets I actually triage in. Tab one is entities currently reporting unavailable or unknown. Tab two is stale entities whose state has not changed in more than N days, where I set N with a control in the app. Tab three is battery entities below a percentage I choose, again set in the app. Both thresholds should persist for me between sessions so I do not re-enter them every time. Show the count of matching entities on each tab label.

Selecting any row opens a detail panel showing that entity's recent state changes, pulled with Get History, rendered as a readable timeline with local timestamps. Use Get State when the panel needs a fresh read of a single entity. The panel should make it easy to see the shape of the problem: a battery sliding down over weeks looks different from a device that flapped between available and unavailable all night, which looks different from one that simply stopped reporting on a specific date and never came back.

Dead entries can be purged in bulk. Let me tick multiple rows and remove them with Delete State, always behind an explicit confirm step that lists exactly what is about to be removed. Enforce one hard safety rule: never offer to delete anything that reported a state in the last 24 hours. Those rows should have their selection checkbox disabled with a short note explaining why, not hidden from the table. Make it clear in the confirm copy that this removes the leftover registry entry, not the physical device.

Each entity also gets a Diagnose this device button that kicks off a background agent. The agent pulls Get History for that entity plus the other entities in the same area, so it can tell a single failing device apart from a whole area going quiet at once. It then decides which of three things this looks like: a dead battery, a flapping radio or hub connection, or a device that was physically removed. It writes a plain-language verdict and a recommended fix back into the app, so the entity's detail panel shows the diagnosis alongside its history, and it files the same verdict as a page in my Notion Home ops database using Create a Page, with the entity name as the title and the verdict, the evidence it used, and the recommended fix in the body. Show diagnosis status in the app while the agent is running, and keep past verdicts visible on the entity so I can see whether this device has been diagnosed before.

Finally, the app publishes a rollup health count back into Home Assistant with Create or Update State, writing a derived entity that carries the current number of unavailable, stale, and low-battery entities as attributes, so my wall tablet can display it and my own automations can react to it changing. Let me set the name of that entity in the app, and let me refresh the rollup on demand from the main view.

One important platform constraint to respect. In Home Assistant, Create or Update State only sets the state representation and does not send commands to physical devices, and this integration exposes no service-call operation. So do not build any device control into this app: no turn on, turn off, restart, or reload buttons, and no copy that implies it can act on hardware. Its writes are limited to purging registry entries with Delete State and publishing the derived rollup entity with Create or Update State, which is genuinely useful because that entity's changes can drive my own Home Assistant automations.

## How to customize

- Change the staleness threshold and the low battery percentage right inside the app, and it remembers what you picked next time you open it
- Change the name of the rollup entity the app publishes back to Home Assistant so your wall tablet or dashboard can read it
- Point the diagnosis notes at a different Notion database, or adjust what the agent writes into each page

## FAQ

### Will this let me turn my devices on and off?

No, and that is deliberate. This app is a health and cleanup tool, not a remote control. It reads your devices, removes dead entries, and publishes a summary number back into Home Assistant. It does not send commands to physical hardware, so there are no on and off buttons anywhere in it.

### Is it safe to delete entities from here?

Deleting only removes the leftover entry from Home Assistant's list of things it knows about. It does not touch the physical device, and if the device ever comes back it will simply reappear. Anything that has reported in during the last 24 hours cannot be selected for deletion at all, with a note saying why, so you cannot accidentally clear something that is still alive.

### Why does it group by integration before area?

Because one broken hub or bridge usually explains dozens of dead devices at once. Seeing them stacked under a single integration tells you to go restart one thing, rather than sending you chasing forty separate faults around the house.

### What does the Diagnose button actually do?

It kicks off a background agent that looks at the device's recent history alongside the other devices in the same area, then tells you in plain language whether this looks like a flat battery, an intermittent radio or hub problem, or something that was unplugged and taken away. It writes the verdict back into the app and saves a copy as a note in Notion so you have a record.

### Do I need a huge setup for this to be worth it?

It helps most once you are past a hundred or so entities, which happens quickly. People regularly end up with hundreds or even thousands of orphaned entries after swapping devices and integrations, and finding them by scrolling the standard interface is slow work.

Use this prompt in General Input: https://www.generalinput.com/prompts/smart-home-entity-health-cockpit-for-home-assistant