Z2M Device Tracker

Replacing a device

The Replace… wizard moves a device's setup to another one: name, area, bindings, Home Assistant entity IDs, notes and, if you want, its battery record. It then removes or renames the old device and links the two histories.

Use it when a device dies, or to swap a working device for another one, including a different brand or model.

Replacing needs Zigbee2MQTT: both devices must be Zigbee2MQTT devices. It isn't offered for ZHA or Matter devices. See ZHA and Matter.

When you can use it

Replace… is on the page of any device except the coordinator, or a device that has already been replaced. For a device that is offline, Not heard from (silent), unidentified (its interview never finished) or removed, it's a button in the About card, and often the main action under What to do. For a working device, it's in the More menu.

Pair the new device first. See Pairing a new device. You don't need to name it: the wizard does that.

Step 1: Pick new device

The wizard lists devices that joined in the last 7 days and still have their 0x… address as their name. Devices of the same model as the old one come first, marked Same model, then devices on the same network.

Turn on Show all devices to pick any other device. If nothing new has joined, Pair a device opens the pairing dialog.

Step 2: What carries over

The second step of the wizard: name, area, bindings, notes and asset details, battery record and removing the old device, each with a tick box

Tick what the new device takes over. Anything the old device doesn't have is greyed out.

ItemWhat happens
NameThe new device is renamed to the old name in Zigbee2MQTT. Each of its Home Assistant entities then gets the entity ID the old device's matching entity had, so automations and dashboards keep working.
AreaThe new device gets the old device's area in Home Assistant.
BindingsThe old device's bindings to other devices and groups are re-created on the new one. Bindings to the coordinator are left out, because Zigbee2MQTT sets those up itself. For another model, each binding is fitted to the new device's endpoints. Only possible when both devices are on the same network.
Notes, asset details and maintenance tasksThe note and asset fields are copied. The serial number isn't. If the new device already has a note, the old one is added below it. Asset fields the new device already has are kept. Maintenance tasks move to the new device, or are copied when you keep the old one.
Battery recordThe battery type, count and replacement dates. Off by default, because a new device comes with a fresh battery.
Remove the old deviceRemoves the old device from Zigbee2MQTT. Its history in the tracker is kept. See below.
Rename the old deviceKeeps the old device in Zigbee2MQTT as "<name> (old)", so its name is free for the new one. See below.

When the new device is a different model, the wizard warns you that bindings may not fit it and some Home Assistant entity names can change, so check the automations that use the old device.

The two histories are linked whatever you choose. If the old device was a critical device, the new one is marked critical too.

Remove or rename the old device

Zigbee2MQTT won't allow two devices with the same name, so the old device either goes or is renamed. You can tick one of the two, not both.

Remove the old device starts ticked for an offline device or a working one. For a silent or unidentified device, Rename the old device starts ticked instead, because that device may still work.

If you keep Name ticked but untick both while the old one is still in Zigbee2MQTT, the wizard warns you that the rename will fail.

Step 3: Apply

The last step lists what will happen. If the new device runs on battery, press its button just before you choose Apply, or the bindings may fail.

Applying can take up to a minute. The wizard then shows a result for each item: Replaced when everything worked, or Partly done with the reason for each item that didn't. The rest is applied either way. Open new device takes you to it.

Afterwards

Linking without the wizard

If you replaced a device yourself and gave the new one the same name, the tracker offers Possibly replaces … with a Link button instead. Linking joins the histories and copies the note and asset details, but doesn't rename, set the area, keep entity IDs or re-create bindings. See Devices and history.