Somehow I’ve ended up with multiple copies of the entities of a lot off my Matter device: some of my devices have multiple copies of all their related entities with the same name, but ending with _2, _3, or _4. All the numbered entities are unavailable and the “main” ones without the numbers are available and working normally.
I’m not sure how those came about, but would like to clear them off as they are cluttering up my entities page.
I’ve tried deleting the entities, but no matter how much of them I select, I get a message saying that I cannot delete them, unless the integration stops providing them:
So I’ve tried to stop the Matter Server addon, and delete them, but I get the same message.
Could you please help me in removing these? Am I missing something else I’d need to turn off before I can delete them?
I’m thinking that maybe rebuilding my complete Matter setup from scratch might help, but I’d like to avoid factory resetting all my devices and re-adding them if possible, as that sounds kind of painful - especially because everything is working, these extra entities don’t seem to be causing any problem other than being somewhat annoying for me.
I managed to sort this out with some advice from this github thread:
I’m leaving a short summary here in case somebody finds this in the future who has the same issue.
In that issue, I’ve been reminded that the Matter Server addon has a Web UI. Looking in the web UI and thoroughly checking what I’ve got there, I’ve noticed, that I have the same amount of duplicate, but offline matter nodes, as the orphaned _2, _3 entities in addition to the online ones.
Actually reviewing which devices got these and how many offline nodes there are made me realize what happened: I had power cuts previously, after which I could only make my devices show up online in HA again by re-adding them after a factory reset.
I did not remove the devices from HA before this reset+readd procedure, thus the offline nodes and orphaned entities were born.
To recover from this, I took these steps:
Remove offline nodes of a device through Matter web UI
Restart Matter HA Add-on
After restart, the device’s duplicate entities are gone, and a new device showed up in HA with default name.
Rename the device with the original name and double check if entity names are correct after the renaming (for automations)
After these steps, things are back to normal, there are no duplicates lingering around and all my previous automations are working.