Howto change device ID of my Z2M device

Hi,

I have added several ZTH05 device.
In the devices.yaml of Z2M I have an entry for example

'0xa4c1381d7f23d37d':
  friendly_name: SZ1
  homeassistant:
    name: SZ1 1D7F23D37D
  optimistic: true

In Z2M it has the correct name:

It shows up in MQTT of HA

How can I change the device id of that device so I don’t have to look up the current id in Z2M to know witch device it is?

Thank you! :slight_smile:

Rename it and tick change in HA :slight_smile:

image

2 Likes

In the Zigbee2MQTT UI

Click the blue button
afbeelding

Be sure to toggle the Home Assistant button to on

afbeelding

2 Likes

On the Z2M dashboard there should be an edit icon:

This will be propagated across to MQTT and Home Assistant.

Careful, though… If you’ve used the original device ID in automations I don’t think this will change - you may have to edit them all.

Edit: Sorry - several people beat me to it while I was cutting and pasting. Damn. :roll_eyes:

1 Like

Thank you! That worked :smiley: