So it seems that the LTS and the recent “recorder” history are only connected through the entity_id of the sensor.
So what you have to do:
- Rename the sensor to what you want it to be in the future, “name1”. This will tie the statistics to the new name
- Remove the device, restart
- The entities are now dead. Delete them. This will retain the LTS orphaned until you go to dev tools/stats and “fix” them. So don’t do that.
- Add your new device and rename the sensor to name1. The LTS will not know there was a change of device reporting. But be careful about units of measurement etc.
Seems to have worked for me as fat as I can tell.