My Floor Plan Thought the Fridge Was a Room
I made my house dashboard discover every Home Assistant device on its own. A message-ID bug hid new plugs, and the floor plan read the fridge as room air.

The first draft of my new floor-plan page showed a little temperature chip on every room tile. One room read 37 degrees. Another read 93.
Neither room was a walk-in cooler or a sauna. The 37 was the fridge, reporting its inside temperature in Fahrenheit. The 93 was the dryer, reporting in Celsius. Both were sitting in rooms that Home Assistant knew about, both had sensors with “temperature” in the name, and my code happily picked a kitchen appliance as “how warm is this room.”
That chip was the last bug of a week spent on one idea: the house dashboard should show every device in the house without me hand-wiring each one. Here’s how that went, including the bug that hid two Christmas tree plugs until I restarted a container.
The dashboard that only knew what I told it
Extremis is my house dashboard, the one that lives on the iPad. It’s a small FastAPI server plus a set of static JavaScript pages, one per room. Back in June I moved it from polling to push: the server holds a WebSocket open to Home Assistant, keeps a live copy of every entity’s state, and streams changes to the browser over Server-Sent Events. Flip a light switch and the tile updates in under a second. (Sentinel, the assistant I write about in the cook monitor post, shares the same house.)
The catch was that every page was hand-built. The kitchen page knew about the kitchen lights because I had typed their entity IDs into it. When I added a new plug or sensor in Home Assistant, it existed in Home Assistant and nowhere on the wall until I sat down and edited a page. Back in June, Home Assistant was already tracking 993 entities. I was never going to keep up by hand.
Let Home Assistant’s registries do the work
Home Assistant already knows the shape of the house. It keeps three registries: areas (rooms), devices (the physical thing), and entities (each switch, sensor or light a device exposes). Each entity points at a device, and each device points at an area.
So on November 27 I added a discovery.py that builds areas → devices → entities straight from those registries over the WebSocket that was already open. It filters out the noise (diagnostic, config, hidden and disabled entities) and maps each remaining entity to a widget kind: a light tile, a cover control, a media player, a sensor reading.
The hand-built pages stayed exactly as they were. Whatever a page didn’t already show landed in an automatic “More in this room” section, and later the same day those discovered items got merged into the page’s own sections instead, so a new lamp shows up in the existing light grid instead of a separate box at the bottom. Devices with no room went to an Unassigned list with one-tap area assignment, and brand-new devices got a “New in HA” badge in the nav.
Discovered doesn’t mean trusted
Auto-discovery means the dashboard will render controls for things I never looked at. That’s fine for a lamp. It’s not fine for a lock or a water valve.
So the discovery code splits widget kinds into two sets:
CONTROL = {"light", "switch", "cover", "fan", "climate", "media_player", "vacuum"} # auto widgets may act
STATE_ONLY = {"lock", "valve", "water_heater", "humidifier", "alarm_control_panel", "siren"}
Anything in CONTROL gets buttons, and even those go through the same safety gate the rest of the house uses before Home Assistant sees the call. Anything in STATE_ONLY just shows its state. Unknown actuators are state-only too, and cooking appliances get status only. If an auto-placed widget tries any other action, the endpoint returns a 403 that says to ask Sentinel, which is where locks and valves go through an approval step. I learned not to trust a tool menu by itself in the light switch post, and the same thinking applies here.
This commit came with tests for the filters, the override merging, the gate defaults and new-device tracking.
The plugs that only appeared after a restart
That same week I added two smart plugs for Christmas trees. Home Assistant had them. The dashboard didn’t. Restart the Extremis container and there they were.
The registries were supposed to stay live. On connect, the server asks for the three registries and also subscribes to entity_registry_updated, device_registry_updated and area_registry_updated, so any change re-fetches them. The subscription calls weren’t working.
Home Assistant’s WebSocket API wants every message from a client to carry an ID, and the IDs have to increase. My code sent the registry list requests first, with IDs from 101 up, and then the three subscriptions with IDs 3, 4 and 5. Home Assistant rejected the subscriptions because their IDs went backwards. The registry lists still worked, so everything looked fine at startup. Nothing told the dashboard about changes after that.
The fix was to subscribe first:
# HA requires increasing message ids: subscribe (3..5) BEFORE the registry list calls (101+),
# otherwise HA rejects the subscriptions and new devices only show after a restart.
for i, evt in enumerate(("entity_registry_updated", "device_registry_updated",
"area_registry_updated"), start=3):
await ws.send(json.dumps({"id": i, "type": "subscribe_events", "event_type": evt}))
_reg_ids.clear()
await _reg_request(ws)
Two smaller changes came with it. Failed subscriptions now print a log line instead of failing silently. And a registry list call that fails now gets removed from the pending set anyway. Before, a failed list call stayed “pending” forever and blocked every later refresh.
The lesson I keep relearning: when a feature works after a restart and not after that, look at what only happens at startup.
A page for every area
With discovery reliable, I wanted every Home Assistant area to have a home on the wall, not just the rooms I’d built pages for. On November 29 that became three things:
- Zone pages. Areas without a hand-built page get grouped into zones, like an Entry & Garage page and an Outdoor page for the balconies and patio. Each area is a labelled section inside the zone.
- Hosted sections. Small areas ride along on a related hand-built page. The halls page, for example, now shows the upstairs hallways and stairways below its own cards.
- A floor-plan hub. The Rooms page opens on a plan built from Home Assistant’s floor registry: one tile per area, grouped by floor, with live chips for lights on out of total, temperature, humidity, occupancy, doors or windows open, alerts and anything playing. Tap a tile and it opens that area’s page and flashes its section.
One rule keeps it from filling up with empty boxes: an area only appears once it has at least one online device and something to render. The garage entrance is hidden right now because its only device is offline. A zone’s nav button hides when all its areas are empty.
Getting the floor registry meant one more live subscription. It took ID 6, right behind the others and ahead of the list calls.
Room air only
Which brings me back to the fridge.
To pick a room’s temperature, the first draft took any temperature sensor in the area. In a kitchen that includes the fridge and freezer. In a laundry area it includes the dryer. In my house it also includes 3D printer nozzles, a coffee maker and, around Thanksgiving, a meat probe. Home Assistant has no “this is room air” flag. To it, every one of those is a temperature sensor in an area.
The fix has three layers:
_SUM_NOT_AIR = re.compile(r"(fridge|freezer|refrigerat|oven|cook|dryer|washer|probe|meat|water|nozzle|_bed|bed_temp|chamber|"
r"cpu|gpu|printer|bambu|snapmaker|ice|coffee|carafe|heater|pool|spa|battery|device_temp|internal)", re.I)
- Skip by name. If the entity ID or name matches that list, it’s not room air.
- Convert, then sanity-check. Celsius readings get converted to Fahrenheit, and anything outside 35 to 110 °F is dropped.
- Prefer a climate sensor. If a device in the room reports both temperature and humidity, its temperature wins. That’s almost always a real room sensor.
The name list does most of the work. The range check alone wouldn’t have caught the fridge, because 37 °F is a believable reading for a cold garage. The humidity preference is the quiet one: it picks the right sensor even in rooms where nothing on the name list matches.
It’s a heuristic, and I know it. A new appliance with an unhelpful name will get past it someday. But this time the failure mode is visible, a weird number on a tile, not a missing device.
Checking it without staring at an iPad
I checked each version with screenshots from headless Chromium at desktop width and at phone and iPad widths, and checked for page errors. One gotcha I hit: changing only the URL hash doesn’t reload the page, so each screenshot needs a fresh page load or you end up photographing the previous screen.
What it got wrong that I haven’t fixed
- The robot vacuum lives in the guest bedroom. That’s its area in Home Assistant, probably because that’s where the dock is. The dashboard is faithfully showing my own data entry. If it’s wrong, the fix belongs in Home Assistant, not in the dashboard.
- The temperature chip is a heuristic. See above.
- Locks and valves are view-only on the new pages, on purpose. Acting on them still goes through Sentinel.
What I’m taking away
The registries were the right source of truth. Home Assistant already knew every device and every room. My job was to read that, decide what’s safe to act on, and stay out of the way.
The two bugs had the same shape. Both were the dashboard trusting something that looked right: a subscription call that got sent, and a sensor that had “temperature” in its name. Neither one raised an error. One just went quiet, and the other gave a confident wrong number. Logging the quiet failure and filtering the confident one were both small changes, but I only found them because I went looking at what the screen actually showed.
If you’re into this kind of thing, the Batcave Deck project is the other live-data display in the house, an ambient HUD under my monitor, and the watchdog post covers the Home Assistant networking it all sits on.


