The short answer: yes for entities, no for every reference

Home Assistant has several ways to point at the same piece of hardware. An entity is one control or reading, such as light.kitchen_lamp or binary_sensor.back_door. A device is the physical product's record behind those entities. An area is the room or space where it lives.

If an automation, scene, or dashboard points to an entity ID, a compatible replacement can often take over that exact ID. The reference then keeps pointing at the same logical job even though the hardware changed. If an automation points directly to the old device, the new unit cannot inherit that hidden device ID just because it has the same name or model. You must select the replacement in that automation.

Area-based intent can be sturdier still. Home Assistant's 2026.7 release gives the example of an automation built around motion in a room: swap one sensor, put the new one in the same area, and the automation can keep describing “motion in the living room” instead of one serial-numbered box.

The rule to remember: reuse a logical identity when the new entity does the same job. Repair a physical-device reference when the physical device changes.

Know which kind of reference you are replacing

What the routine points to What happens after a swap What to do
Entity ID
switch.coffee_plug
The reference can keep working if the new entity uses that exact compatible ID. Test the new entity, choose the ordinary or history-preserving handoff below, then assign the exact old ID.
Device trigger, condition, or action It stays tied to the old device record. Reusing an entity ID does not rewrite it. Open every related automation and choose the new device or rebuild that step around an entity or supported purpose-specific trigger.
Area, floor, label, or group The intent may survive when the replacement joins the same grouping and offers the required feature. Assign the replacement correctly, remove the old member, then test which entities the target now includes.
Friendly name only
“Kitchen lamp”
The label can look identical while the real reference underneath is different. Check the entity ID or device reference; do not trust the visible name alone.

A button or remote may expose no ordinary state entity for its presses, so its automation can legitimately be tied to the device or its events. Those are normal exceptions, not mistakes. The important part is knowing they will need deliberate attention during a replacement.

Before removing the old device

  1. Create a manual backup. Go to Settings, System, Backups, choose Backup now, and store the emergency kit safely if Home Assistant asks for it. A backup is the recovery point for the configuration work around the device.
  2. Leave the old record in Home Assistant. Even if the hardware is dead, its device and entity pages can still show names, IDs, area placement, and related items.
  3. Record every useful entity ID. A multi-sensor may have temperature, humidity, battery, signal, and diagnostic readings. Map only the ones the household actually uses.
  4. Open Related for the device and its important entities. Home Assistant 2026.8 expanded this view so it can surface scenes, scripts, groups, shared labels, and areas as well as automations. Open each important result instead of assuming the list tells the whole story.
  5. Check the places Home Assistant cannot fully inspect. Look at manual dashboards, templates, Node-RED, AppDaemon, MQTT rules, voice-assistant exposure, and routines in a vendor app. A text template can contain an entity ID without appearing as a simple picker relationship.
  6. Write down the expected behavior. Include button presses, brightness, units, open and closed states, battery reporting, alerts, and any safety fallback. “It connected” is not the same as “it replaced the old job.”

Do not edit Home Assistant's hidden .storage files to force a new device to look like the old one. Those files are internal data, and a hand-edited device ID can damage more than the one routine you are trying to save.

A safe replacement workflow

  1. Add the new device with temporary names. If its integration—the connector that brought it into Home Assistant—permits both records at once, names such as “Kitchen lamp new” make it obvious which hardware you are testing. If the old wireless device must be removed first, finish the inventory and backup before that removal.
  2. Test the replacement in Home Assistant. Confirm that commands work, state changes arrive, and the new entity is the same type. A new switch cannot simply take a light ID; the word before the dot is part of the address. Use a supported “Show as” option or update the references instead of forcing a mismatch.
  3. Move the replacement into the old area. Copy relevant labels and group membership. Check that area-targeted actions do not accidentally pick up both old and new devices during the overlap.
  4. Choose how to free the old entity ID. If old history does not matter, you can rename the old entity to a clear temporary ID such as switch.coffee_plug_retired. If history or Energy matters, do not rename it first: after the inventory and new-device test, remove the old entity through its integration so its original ID is free. Home Assistant's current documentation says an entity-ID change requires checking uses in automations and scripts; the visible friendly name alone does not change those references.
  5. Give the new entity the exact old ID. Match the complete domain and name, including underscores. Repeat only for compatible entities that should continue the same logical job. The history path is community guidance, not an official guarantee, so verify it before discarding the backup.
  6. Repair direct device references. Open each related device trigger, condition, or action and select the replacement. If a supported entity, purpose-specific trigger, area, label, group, or small script expresses the household intent better, this is a good time to make that one routine less hardware-dependent.
  7. Check scenes and dashboards. Reusing the entity ID often helps, but a new model may not support the same brightness, color, fan mode, cover position, or other stored attribute. Open, test, and resave important scenes and cards.
  8. Test from every control surface. Run the automations manually, create the real trigger, use the dashboard, try voice control, and test remote access. Restart Home Assistant once before calling the cutover complete.
  9. Retire any remaining old record last. If you used the ordinary rename path, delete or exclude the old device only after Related is clear enough, the new device has survived ordinary use, and a rollback is no longer needed. The history path removes the old entity at the handoff, after the replacement has already been tested.

When the failed item is a Zigbee coordinator, Thread border router, Matter controller, or the Home Assistant host itself, stop here: that is an infrastructure migration, not a one-endpoint swap. Use the matching backup or radio-migration process because renaming one entity cannot preserve an entire network.

The same model still counts as a new device

A replacement bulb, sensor, or plug normally arrives with a new radio address, serial number, MAC address, or other hardware identity. Home Assistant therefore creates a new device record even when the box and model number match. The new unit may expose a familiar set of entities, but it does not generally inherit the old device ID.

Some integrations or radio tools offer their own replacement operation. A Z-Wave “replace failed node” workflow is a protocol-specific example. Use an integration's current documentation when that option exists, and still verify entities and routines afterward. It is not proof that Home Assistant has a universal replacement button for Wi-Fi, Zigbee, Bluetooth, Matter, HomeKit, and every vendor integration.

Replacing one brand with another needs an extra check: make sure the new product exposes the same behavior, not merely the same category. A motion sensor that reports motion but has no illuminance reading cannot take over an automation that also used the old light-level entity.

History and Energy data need a separate decision

Reusing an entity ID can make recorder history and long-term statistics line up, but do not promise yourself a seamless chart. Current community guidance from a Home Assistant maintainer is to delete the old entity, then give the new entity the old entity ID. Renaming the old entity first can move its history to the renamed ID instead. This is not a documented one-click migration, and overlapping old and new histories add uncertainty.

Home Assistant's statistics system also cares about the measurement's unit, what the sensor represents, and how its total is calculated. A change from watts to kilowatts—or from one kind of measurement to another—can create a misleading record even when the ID looks right.

  • Keep the backup. History repairs are not the time to discover the only copy lived on the Home Assistant drive.
  • Use the same ID only for the same measurement. A new temperature sensor can continue an old temperature role; a different kind of value should start a new identity.
  • Check Energy separately. Confirm that the replacement is still selected as an Energy source and that its totals, units, and calculation type are valid before trusting a bill or solar calculation.
  • Avoid overlapping histories when continuity matters. Test the new sensor first, but follow the delete-old-then-reuse-ID order for the final handoff. If both entities have accumulated statistics, pause and inspect the exact case before combining anything.

If preserving a long historical series matters more than a tidy cutover, pause before deleting anything and use the current recorder and statistics guidance for your exact entities. A working automation and a continuous chart are related goals, but they are not the same migration.

Be slower with locks, alarms, heating, and leak protection

Prove the workflow on a lamp or ordinary sensor before a lock, garage door, thermostat, smoke or leak alert, alarm input, water valve, or other safety-sensitive device. Keep the physical key, manual switch, thermostat control, shutoff, or alarm path available throughout the swap.

For a mains-powered wall switch or hardwired device, follow its electrical instructions and use a qualified electrician where required. Home Assistant should add convenience and visibility; it should not become the only safe way to operate essential equipment.

After the cutover, test failure as well as success: disconnect the internet if the path should be local, restart Home Assistant, let a battery device sleep and wake, and confirm that an unavailable state does not make a routine behave dangerously.

Make the next replacement easier

  • Use entities for a stable household role. “Kitchen lamp” can outlive a particular bulb. Home Assistant's developer documentation says it is exploring alternatives to legacy device automations; existing ones still work, but new device automations are no longer accepted from integrations.
  • Use areas when the room is the intent. “Turn off the downstairs lights” is often more durable than a list of individual serial-numbered devices.
  • Use groups or labels for a changing set. They are useful when several devices share a role, but test what the target includes after adding or removing a member.
  • Put repeated actions in a script. Several automations can call one “set evening lights” script, leaving one place to update when the controlled hardware changes.
  • Keep plain documentation. Record the physical location, integration, entity IDs, critical routines, and manual fallback for important devices.

Tara's guide to choosing where automations should live helps keep one clear source of truth instead of duplicating the same routine in Home Assistant and a vendor app. If you are building a system around replaceable roles from the start, the local home automation kit is the closest planning path.

Tara's practical recommendation

Keep the old record, make a backup, and discover every use before touching identifiers. Add the replacement under temporary names, prove that it performs the same job, then reuse exact entity IDs where that is technically compatible. Repair each direct device reference instead of trying to transfer a hidden device ID.

Put the new device in the same area, test scenes, dashboards, voice, external tools, and real triggers, and delete the old record only after the home behaves normally. That sequence takes a little longer than removing the dead device first, but it preserves the information you need when something does not follow automatically.

Frequently asked questions

Can I replace a Home Assistant device and keep its automations?

Usually, if those automations refer to the old entity IDs. Give the replacement the same compatible entity IDs after testing it. Automations tied directly to the old device ID will not follow and must be updated.

Is using the same friendly name enough?

No. A friendly name is the label people see. Automations and dashboards commonly use an entity ID such as light.kitchen_lamp, while some automations use a hidden device ID. Record and check the actual references.

Does buying the same model preserve the Home Assistant device ID?

Not generally. A new physical unit normally has a different hardware identity and therefore a new device record. The same model may expose matching entities, but direct device references still need checking unless the integration offers its own replacement procedure.

Will Home Assistant history and Energy data carry over?

They may line up when the replacement reuses the same entity ID and reports compatible units and statistics, but this is not guaranteed. Treat history and Energy as a separate check, keep a backup, and never combine unrelated measurements under one ID.

Should I delete the old Home Assistant device first?

Usually no. Keep its record long enough to note entity IDs and related uses. Add and test the replacement under temporary names where possible, move each reference deliberately, and delete the old device only after the household routines pass.