Hi, I want to upgrade one of my esphome devices from a devkit1 to a quinled board, and thought I could just upgrade the yaml to the new board type and new pin numbers, while keeping the esphome name and therefore also the entities, statistics etc in home assistant.
Unfortunately this results in HA detecting the node as new device, while showing the old one as offline. Both names are identical.
Is there no way to upgrade the esp32 board of an esphome node without starting from scratch when it comes to statistics, automations, etcetc?
Delete the ESPHome integration for the device from HA.
Power down the existing device.
Upload to the new device.
Add the discovered device to HA.
If you did not change anything in the device config except the board type then all new entities will match all old entities and states and LTS will continue from the old device.
Because you did not delete the old device first you should now:
Leave the new device powered up.
Delete both the old and new ESPHome devices from home assistant (Settings → Devices & Services).
Restart home assistant.
Add the discovered device to home assistant. If it does not show up just power cycle the new device.
Its history data should continue on from the old device data.
Thanks a lot, that worked One exception though: the entities used in automations needed to be reassigned. Example: the statistics for the co2 meter etc are still connected to the statistics from before, but the pushbuttons (gpio binary sensors) need to be reassigned. But that’s minor cleanup.