I am trying to get my test device working again, after having deleted is from HA. It is a SOnOff S20, and I have one of those in my working system.
To try to get things right the first time, I went to the ESPHome webpage (in my site), selected Edit under the working device, copied the yaml file, pasted that stuff into the yaml file for the test device, changed the device-specific names, installed the code into the test device (locally, not via the WiFi), and then restarted HA. When I go to Configuration->Devices and select the working device, I see three entities: controls, sensors, and diagnostic; and the button in controls is operational. However, when I select the test device, I see only the control entity(and it says āThis device has no entitiesā and there is no button.
Why are these different? More importantly, how can I get the test device working again?
I restarted Home Assistant and waited for a couple of minutes before plugging the S20 into the wall. Once HA was restarted, I went to the ESPHome page and the test device is showing as āonlineā. However, there is nothing in the logbook, at all, for this device. Also, in History, I do not see the device (but see it as āunavailableā starting a couple of hours ago).
OK - I found the ESPHome log and I added it to the zip.
Also, I went to Integrations ā ESPHome and saw that there was a disabled device. I enabled it and the device now appears on the Integrations page. I clicked on it, then on ā1 entityā, which showed me an entity, but with a red exclamation point on the mouse-over text of āUnavailableā. (Also, the name of the entity does not seem to be correctā¦)
it was just a ājokeā inside my head related to (i) and no commercial ā¦ have you resetted the device ?, ā¦ āunavailableā ?( after first attempt to add it, or in old name ), sounds like it wasnāt āremovedā properly, the first time, if itās still āregisteredā under old name in device.config, sounds like itās ādiscoveredā as same device/thou renamed
*remove it again
make sure itās gone in (/config/.storage/core.device_registry and core.entity_registry
*reset and unplug the device
boheme61: Thank you. I did a bit more than you suggested - I did a grep -r in the config folder and found every instance of the old name and then removed it from all files. I then rebuilt the code, installed it, and everything worked.