Skip to content
Independent gear for the technically inclined // Printed on demand

Signal / 028 — Home Assistant changes an entity ID without rebuilding the entity

Fresh signal: Renaming a Home Assistant entity looks cosmetic from the dashboard. Inside an integration, it has historically meant tearing the entity down and adding it again.

Home Assistant’s developer team documented two new entity lifecycle hooks on October 12. async_prepare_to_add_to_hass, available from Core 2026.10, gives integrations an awaited step before the platform processes an entity’s registry entry or writes its state. A second hook, async_entity_id_changed, supports the in-place rename behavior planned for Core 2026.11.

Renames stop pretending to be replacements

From 2026.11, Home Assistant says an entity-ID change will move internal bookkeeping and state to the new ID without calling the normal removal and addition lifecycle. Integrations that keep subscriptions, caches, or other data keyed to entity_id can use the new callback to update those references directly.

Custom integrations must opt into the new behavior if they implement related lifecycle methods. Until they do, Home Assistant will retain the older remove-and-add path. The project says that compatibility layer is scheduled for removal in Core 2027.11, giving third-party maintainers a defined migration window.

Small API, fewer edge-case ghosts

The preparation hook can also run when an add attempt is later aborted, such as an ID collision or disabled registry entry. Developers therefore cannot assume the entity will finish adding, and cleanup should be registered through Home Assistant’s removal helpers.

Opinion: This is invisible infrastructure work with visible benefits: fewer unnecessary reconnections, cleaner state transitions, and less chance that a rename briefly behaves like a device disappearance. Custom-integration authors should test renames before the compatibility clock expires.

AI-assisted summary: Drafted with AI assistance and reviewed against Home Assistant’s official developer documentation. No custom-integration testing is claimed.