I have tried to repurpose some Wemos D1 Mini’s that were connected to HA via ESPHome, and I’ve had problems as a result. Entities are duplicated, ESPHome devices are duplicated, and it is a real pain to correct. Is there somewhere in HA that holds information from the device so that HA recognizes it and tries to load the old entities,etc? It appears that when I try to set up a previously used D1 Mini, the old info is still being used when the device is online. I hate to throw away perfectly functional devices, but so far I have not been able to re-use them because of the duplication issues. Is there a file with the info or some way to clear this info so that I can re-use a device in a new application without creating problems?
I have removed them, but if I try to re-use a device for another purpose the entities pop up again. It looks like HA somehow has the MAC address of the D1 Mini and keeps associating the entities with it even after I install it as a new ESPHome device.
for example. I had a D1 Mini with a DHT sensor attached. I wanted to use it with a motion sensor instead. I deleted the old ESPHome device and then added a new device using the same D1 Min but configured with a motion sensor. New name, new everything. It loads and works as the new device, but the old device reappears in my ESPHome view also. Before I realized what was happening, I ended up with 2 or 3 instances of some ESPHome devices and their associated entities. I can delete them, but they come back. If I put the newly configured device online, the old entities reappear