Why are 'identical' devices different

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?

No logs = no issue.

maybe just a i-noname-mentioned issue

boheme61: pretty sure I gave it a somewhat different name

nickrout: Is there more data of any kind that I could upload to make it possible for folks to help address this issue?

The yaml config of both devices and a log of the troublesome one starting and connecting to home assistant.

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).

The two yaml files, both of which are in the folder /config/esphome, are available here: http://pairofdocs.net/wp-content/uploads/2022/03/yaml.zip.

I was talking about the esphome logs for the device. Sorry if I wasnā€™t clear.

Similarly I was talking about a restart of the esp device.

But I may have found a problem, the files have different line endings.

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ā€¦)

:slight_smile: 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
  • restart HA , start from scratch

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.

1 Like