How to delete ghost devices?

I have several ESP8266 devices that I had loaded with sample code, then edited and installed new code. For some of these, the original code won’t go away:

If I adopt them and flash the desired yaml, they just come back. I’ve tried deleting every file and folder in the ESPHome folder that refers to them, but they still come back. I can’t find a way, either, to remove the subtitles in the final devices that refer to the originals. How can I edit or rename lowercasename and solarwaterheater so the subtitles disappear, and make the esp-web-tools-examples go away? Thanks for any help.

Try this go into settings / device & services / under ESPHome see if there is a ones with example. If so click on it and remove/delete it. If you would like to start fresh you will have to delete it in both areas (under devices & services & in ESPHome) then reinstall them.

A simple restart of the esphome add-on should fix this :arrows_counterclockwise:

I found I had to delete/reinstall in both places more than once, restarting HA in between, but finally got things like they should be. Thanks.