---
title: "Naming things in Home Assistant"
description: "Relocating smoke detectors kicked off a whole-house naming cleanup, from hardware IDs on labels to ghost devices and a rename skill that scans consumers first."
url: "https://michael.zazon.us/notes/naming-things-in-home-assistant"
published: "2026-08-18T12:00:00-04:00"
kind: "build-log"
subject: "home-automation"
tags: ["home-assistant","safety"]
---
I needed to relocate some smoke/CO detectors, so I needed to give them proper names, and that's when I noticed that all my other names in Home Assistant were.. well, a year after moving house, many of the entity IDs still had the rooms from the old house.

So the detector job turned into a whole-house naming cleanup. The Hue bridge went from 63 devices to 39, and I rebuilt the list of areas to actually reflect the floors in this house.

## Named the detectors twice

I wrote the hardware ID on each detector in sharpie, so the first pass was to name them `<Room> ID-X` so I'd have the ID in every alert. I redid that as `<Room> Smoke/CO` to match the `<area> <what it is>` pattern from [voice assistant best practices](https://www.home-assistant.io/voice_control/best_practices/), moved the ID to a [label](https://www.home-assistant.io/docs/organizing/labels/), and decided I didn't want `ID-G` in a 3am fire page, but that I could still filter for the ID with one label filter, and that the label would survive if I ever renamed the room (and rooms in this house demonstrably get renamed). Cost: 236 entity renames and one automation update.

I'll do the ID-to-label move first next time. Labels are the best way to hold the ID.

[Image: Home Assistant labels list with one red label per detector ID](https://michael.zazon.us/notes/naming-things-in-home-assistant)

## The pretty ID was the dead one

This has come up a few times before, so I have codified protections against this now. In one case, the SmartThings copies of my Hue bulbs had clean IDs, but the real Hue entities were on `_2`. In another, a Hue room group was skipped by reconcile, same outcome. In the third, I re-registered my Samsung TV and left the old entities. The nice ID was always the dead one. Always check the state of the entity before renaming.

A few days later, I had the same pattern with 3 Ring devices where I'd replaced the hardware. [ring-mqtt](https://github.com/tsightler/ring-mqtt) keys devices by MAC, so a replacement means remove then add. Home Assistant never prunes the removed device, so it won't reuse the entity ID the ghost is holding, so the live replacement ends up on permanent `_2` IDs, and my dashboards still point at the dead one. The first ghost was my Veranda Door doorbell, which looked broken in Home Assistant but was fine in the Ring app. The second was my Front Door camera. The third was my kitchen chime, which the dashboard said was offline even as it was audibly chiming. I deleted each ghost, then moved the live entities onto the freed IDs.

> [!warning] Replaced Ring devices land on
> Since ring-mqtt keys devices by MAC, a replacement means remove then add. But home Assistant never prunes the removed device, so the live replacement ends up on `_2` IDs. Delete the ghost, then move the live entities onto the freed IDs.

[Diagram: Ring ghost holds clean IDs until deleted, then the live device takes them](https://michael.zazon.us/notes/naming-things-in-home-assistant)

## Not all duplicates are ghosts

My smoke/CO detectors had pairs of "Alarm silenced" entities, with one of each pair on `_2`. I thought this was more ghosts, but I was wrong. Each pair was from the same Z-Wave device, but reporting separately for the Smoke and CO notification classes. Deleting either one would mean losing life-safety telemetry from a working detector.

> [!warning]
> Before calling any entity an orphan, look at its platform and config entry in the entity registry. Two entities with nearly identical names on the same device can both be live and both be needed.

## Renames don't tell anyone

Renaming never updates referrers. I renamed a Ring old-house device and silently broke a Grafana alert exclusion for battery cameras. The regex still matched the nonexistent `sensor.lounge_wireless`, but the live `sensor.back_bedroom_wireless` started paging. The alerts run on the setup from [VictoriaMetrics as the first metrics database on my home server](https://michael.zazon.us/notes/victoriametrics-as-the-first-metrics-database-on-my-home-server). I changed `lounge` to `back_bedroom` in the exclusion and commented in the rule file to check on every rename. I also added an alert: if a Home Assistant entity is unavailable for 48 hours, the dead entities surface themselves. The first test firing was the Ring ghost I'd deleted hours earlier.

## Scan first, then rename

After hand-writing the same rename checks for the third time, I decided to write them down once. I built a little rename skill around the read-only scan: I can now enter an entity ID and get a list of all automations, scripts, and dashboards that use it. I run this before every rename and patch the findings first.

The first real use case was the Hatch sound machine in a kid's room. Three presets were all named "Ocean", so the entity IDs use the Hatch preset number instead of `_2` or `_3`. The number comes from the device itself, and it matches how we use it in the family ("we use 5 often"). Could I just rename the preset in the Hatch app instead? No.. the integration builds the scene identity from the favourite's name in the app, so renaming it there would orphan the Home Assistant entities. Renaming the preset broke six dashboard scene references, but the scan caught all six, and a second scan came up clean after patching them.

## Still fixing area stutter

The next thing I'm still working on fixing is area stutter, where new integrations will prefix the area to an entity name that already includes the area, resulting in `media_player.living_room_living_room_tv`. I renamed a batch of these in one session, including `media_player.parlour_parlour`. I left `light.boiler_room_boiler_room` alone because it's well established and the cost of renaming it outweighs the stutter.