WTH- new ESPHome device gets the entity ID from another ESPHome device? WTH?

I just created a new ESPHome device using a Sonoff Basic (ESP8285).
Why is my entity ID from another sensor?

In my yaml file:

substitutions:
  device_name: basement_sconces
  friendly_name: basement_sconces
  
text_sensor:
  - platform: wifi_info
    ip_address:
      name: ${friendly_name} IP
    ssid:
      name: ${friendly_name} SSID
    mac_address:
      name: ${friendly_name} Mac Address

My basement_sconces IP entity has the entity ID of: “sensor.counterlight_ssid_2”

Even stranger, my counterlight friendly name for “sensor.counterlight_ssid_2” has become “basement_sconces SSID”

WTH is going on here?

Xmas magic?

Re-used IP address from the older device maybe? I get a lot of duplicated ESPHome devices after updates or rebuilds. I delete everything I can in devices and entities and re-discover them, they come back with the correct names.

I have 88 devices, most of them running ESPHome and I’ve never seen this confusion with the device ID. And especially concerned with the friendly name change of an existing device.

I delete everything I can in devices and entities and re-discover them, they come back with the correct names.
[/quote]

It’s my understanding that the only way to delete non-existent ESPHome devices is to delete the integration, reinstall it and let ESPHome discover them all over again. Scary. I haven’t tried that yet. And considering the number of automations that I have had to edit due to the blasted “_2” suffixes on the device name, it would be an all-day job.

I did, however, restore my HAOS to a backup 21 hours old and things are back to normal.

The Sonoff Basic is still working, but the only way to use it in an automation is to “add integration” and give the ESPHome integration the device IP.

1 Like

HA automatically ads “_2” if the entity name is already in use/taken. Check the dev tools to find out to which device they belong and clean up before adding your sonoff again (after deleting the esphome device integration for that particular sonoff to get rid of the “_2” entities).

Lucky you its not an