How to transfer Statistics from and old entity to a new entity 2025

Home Assistant
    Core 2025.2.5
    Supervisor 2025.02.1
    Operating System 14.2
    Frontend 20250221.0

Added a new sensor to ESPHome to replace and old sensor.
If the old sensor is not present I cannot access the statistics.
I want to transfer the older statistics (long term) to the new sensor.
I then want to update the sensor name as there are now multiple devices that need identifying.

I cannot find a way to transfer or change the names that retains the data.
Is there a method I can follow within HA?

For example, a 3 year old sensor temperature would be replaced with temperature AHT20.
If temperature is not available, I cannot view the statistics.

I’m try to follow Petro’s method but I cannot delete the entities.