Moes TRV is not fully removed via ZHA Remove Device

Hi,

I bought 5 Moes thermostatic ratiator valves (TRV).

These didn’t pair correctly in ZHA so I added a custom quirk outlined in this git page. My model is _TZE200_b6wax7g0 which I think is mistakenly listed in the Beca section not the Moes section, but either way, it exposed many many more entities, which was outstanding:

However, one of them wasn’t working well before I added the beca.py quirk, and after I added it, all the new entities were there, but the most important one, the Thermostat, wasn’t showing a proper dial when clicked on (it didn’t have the red temperature slider and wasn’t interactive at all).

So I removed and re-added it a few times it using the ZHA Remove Device flow, but each time I’d get the same problem.

Very weirdly, I then tried with a fresh TRV that had never been turned on, paired it and added it to the same room (this might be a helpful diagnosis clue?), and it had the same problem!

I then removed that one too, but I can see that they’re both still there in ZHA (even after both being removed via ZHA - but their names have been removed but not in all places:

The final piece of troubleshooting I’ve done was to use Samba share to remove them from core.device.registry (I saw this suggested in another post somewhere but can’t find it now), but every time I restarted HA, they reappeared in that file, with unregistered/null in place of Area, device name etc (not the model of _TZE200_b6wax7g0).

It very much looks to me like they aren’t being deleted properly using the ZHA Remove Device flow, so are there any other ways to remove devices that are more forceful/comprehensive?

Thanks in advance for making it all the way here!

In case anyone else is going through this headache, I just solved this by:

  1. Removing the batteries for a couple of weeks
  2. Factory resetting the TRVs, actually on the physical device itself
  3. Removing the devices in the core.device.registry text file
  4. Repairing with ZHA.

Can I ask how one could edit this core.device.registry file?
I have some remains of an old device in my ZHA setup that I cannot delete from the UI.

You can use VS code server or another file editor add-on. Be careful though, do backups before you change anything.

I use the File Editor add-on, but it doesn’t see such file. Is it hidden or something?

Yes, it is under .storage which is hidden. folders named with a . first are hidden.

Thank you, it worked. It took me a while to find out how to show that hidden folder in the File editor add-on. The settings for that aren’t actually in the File editor itself, but in Settings > Add-ons > File editor > Configuration tab. After deleting the appropriate lines in core.device.registry for my undeletable device, it’s now properly gone from the UI.