Change sensor hardware

I am building a new (first) Home Assistant setup on a raspberry pi 4b with several esp wifi boards as sensors.
If, in the future, one of the sensors need to be replaced, can I simply flash a new esp board with esphome and simply copy (parts of) the configuration file of the defect esp board, or will I lose the complete history of this sensor?

I would like to use the existing history with the new sensor as if it is the old one.
Which part of the configuration is important for this, the id?

Most likely not. I’ve replaced ESP boards before and not had this issue.

Where you may have difficulty is if you use device automations. See: What happens if I have to replace a device - #2 by tom_l

1 Like

Tnx for your quick reply!
Good to read the mentioned topic also!