Migrate sensor data

Hi All!
I’ve recently purchased a Sonoff Zigbee USB dongle, to remove my old Xiaomi Gateway. I have two zigbee Xiaomi Temperature and Humidity sensors connected with the Xiaomi Gateway.

Now, what I want to do, is to migrate all the historical data to the new sensor id created. I was checking my SQLite database, but I don’t know how can I identify my sensors.

Has anyone migrate data from one entitiy to another?
And another question, can I migrate data in InfluxDB?


Can’t help much with migration of sensor data as such and I’m no expert in that. But just in case you weren’t aware, the history for your entities can be maintained if you retain the same entity_id. I’ve replaced a number of wifi plugs with Zigbee recently. My method was to rename the old entity (e.g. light.bedroom_light_old) then set up the new entity with the name you had before (e.g. light.bedroom_light). There’ll be a short gap in data whilst you do the renaming, but you can still see the history and logbook data across the old and new device. Sound like that would be sufficient for your requirements if it’s a straight swap, and a simple solution.

Thanks for your answer! I’m trying this solution, but I’m having problem deleting the old ones, but sound the solution to keep the historical data.

Deleting the old ones depends on the integration. Some you can delete from the device page, some you can remove from the integrations page. If my previous answer helped solve your problem, appreciate if you can mark it as ‘solution’.