Removing a removed device

Hi, my HA developed problems a while ago where YAML configuration files for ESPHome disappeared. The system kept working so I ignored it at 1st. But one by one my mains switches in HA stopped working and my Sonoff basic units, which control my radiators, also started misbehaving.

So I created new YAML files for my Sonoff. The 1st Sonoff integrated fine in HA, so I continued the same process: 1 remove the device from HA, 2 write the new YAML file to it, test it updates wirelessly in ESPHome. The yaml file and nodes have new names (climate dining room).

The latest Sonoff was not detected by HA however, and the old device (CH switch 4 dining room) is still listed under devices. I have rebooted HA several times.

How do you remove the old device and force HA to adopt the new configured/programmed Sonoff basic?

I read some posts about 3 options with the 3rd being a dreaded registry/hidden file edit/ensure you’ve got a back up :grimacing:

You might find the offending item under Developer Tools / Statistics. For a different reason I had to “fix” an orphaned statistic that fouled my energy meter readings, “fixing” items listed as having an issue was what worked for me.

Also try settings ➜ devices & services ➜ entities. Sort on the status button to bring unknown/unavailable to the top. You can then multi-select and delete them.

1 Like

Thanks, there was a whole lot of junk in there and I wasn’t aware of this location. I’ve removed what I could. But the odd thing is, that under the old (removed I thought) device name, readings appear from the time I enabled the newly programmed sonoff. Like I said, the new Sonoff, has a different node name. The system is confused I think.

I did try to do this before, but I can’t remove them. Under the cogwheel, scroll to the bottom, there is Update and Delete. Delete is greyed out.

That means the entity is still in use in yaml somewhere. You need to find it and remove the yaml.


You must go in the integration ESPHOME, and remove from there the device

Ah, I made reference to all remaining Sonoffs in a custom thermostat. I’ll have a look tomorrow. Thanks for the suggestion!!

Thanks, it appears to have worked. I removed the references from my custom climate thermostat. HA did not recognise the component but I could add it manually via the IP address.
All of your help is really appreciated.