How to adapt existing device in ESPHome

Hi,
I face an issue where an existing device is Discovered by HA. When Configuring, it will show and it it to the ESPHome integration.
image image

However, it does not show up in the ESPHome

Repeated this process a few times and restarted HA every time.

What I tried is deleting the esphome.***** files according to ESP-Home Device available in HA as device but not in the ESP Home Integration - #10 by orange-assistant
without success.

I do find many issues in the log, all look like :

2023-04-18 13:02:42.513 DEBUG (MainThread) [homeassistant.components.esphome.entry_data] irrigation: ignoring duplicate update with and key 3584301311: TextSensorState(key=3584301311, state='100', missing_state=False)
2023-04-18 13:02:42.915 DEBUG (MainThread) [aioesphomeapi.connection] irrigation @ 192.168.40.9: Got message of type <class 'api_pb2.TextSensorStateResponse'>: key: 1094985903
state: "0s"

2023-04-18 13:02:42.915 DEBUG (MainThread) [homeassistant.components.esphome.entry_data] irrigation: ignoring duplicate update with and key 1094985903: TextSensorState(key=1094985903, state='0s', missing_state=False)

So I guess I need to remove the original “irrigation”. I would like to know where and how to do so.
When I delete this integration, no entities are found within HA…

thx

I was able to workaround it by creating the device as it was before. Then copied the YAML in it an did OTA.

As this is a workaround, to me it seems a bug (as proven is found in the logs), while deleting a device in ESPHome should delete / clean all related files / database records etc.

Hope this can be fixed in an update and helps anyone running into the same issue.