Moving from Aqara hub to Z2M advice on entity changes

Hey guys, I decided to move from my 30+ sensors connected to my Aqara hub to a SLZB adapter and going to Zigbee2MQQT. I have many automations set up for just about all of the sensors. Is there a way to replace these sensors in a smoother way than comparing what automations the old sensors are in, deleting the sensor, adding the new one, and then adding the new entity to the automations?

Depends, are your automations using device id’s or entity_id to target your things?

(hint: you want entities)

1 Like

The vast majority are by entity_id

1 Like

Awesome that’s good because the ones referring to devices will need to be touched. No matter what because that device no longer exists.

If you’re using entity ID then as long as you can get the entities to have the old names it will just truck along.

Thats the rub though - your new integration may not expose all the entities the same way. It may, I’d bet you’re probably 90% or better. So when they come up make sure they all get the old names then fix the outliers that didn’t bring entities in the same way.

Had it been devices though… Ouch.

1 Like

Entity ids are easy to match up in Z2M.

After pairing the device click the pencil icon next to the device in the z2m dashboard:

Then enter a name that matches your old entity id:

Untitled

e.g.

Old entity id:

switch.bathtub_toaster

Name your device:

Bathtub Toaster

The name will be converted to lower case, underscores will replace spaces and special characters and this will be your entity id.

Delete your old entities before doing this or you will end up with switch.bathtub_toaster_2 (though this too is easy to fix by deleting the old entity and restarting home assitant).

2 Likes

bathtub_toaster :joy: Thank you for the detailed help and pictures here. I was able to get a list copied and formatted into a spreadsheet of my Aqara entities so I will use these as a reference when adding the new sensors. Aqara seems to remove the entities first before you can start searching for a new hub, or Z2M in my case, which also removes them from HA it looks like. Ill keep an eye out and play with it. Thanks again!