Merging data from two sensors - rename gone wrong

I renamed a Device that monitors climate data, and selected to rename the entities when I renamed it. However this seems to have created a new set of entities, with the ones using the old name still existing and with all the historical data but not updating since the renaming.

How can I merge the two sets of entities so that I can keep my historic data?

sensor.old_name_temperature - has data up till 4 hours ago
sensor.new_name_temperature - has data since 4 hours ago

sensor.old_name_humidity - has data up till 4 hours ago
sensor.new_name_humidity - has data since 4 hours ago

I want to get to the point where I only have sensor.new_name_temperature with all the data.

Only option to my knowledge: copy in the db … not for the fainthearted

No new way to do this?

Have some sensors (Solar production and grid usage) from some old devices that i would like to merge the data with the new device so i wouldn’t lose the data.

I never figured out how to do this, and just abandoned half the data. :frowning:


I have about 2 years of data! dont want to loose it!! xD