Hy guys, I need a hand before touching my database.
I had issues with my old meross energy monitor so I bought new Tuya device and they work as expected. Now, I need to merge hystorical data from OLD Meross device to the NEW Tuya device. But I a total noob in SQL. I had done an entire HA backup and manual database backup so I’m safe from mistakes. Can you give me a hand please?
So my OLD device is "sensor.meross_lavastoviglie* ". There are five entities in total. My NEW device is "sensor.lavastoviglie_* ".
Could I simply change the ID of the records from lets say “sensor.meross_lavastoviglie” (Ampere data) to the ID of “sensor.lavastoviglie_curretn” (always Ampere data)? And the same thing for all others?
From what I had understand I need to modify data from STATISTICS_META table and STATISTICS table. Maybe also STATISTICS_SHORT_TERM, am I correct?
PS: I’d used an online CVS editor to discover IDs of my device befeore make any live data modifications. Names of the tables are different as you can see, they have an “-export” at the end so we need to adjust that in live querry.