I already found a post, but that piece of python code refuses to run, it's a bit old (2024) so that could be the cause. anyone has some insight how to get this up and running again?
https://community.home-assistant.io/t/merge-statistics-of-old-entity-to-new-entity/467816/42
Traceback (most recent call last):
File "/usr/lib/python3.12/site-packages/pandas/core/indexes/range.py", line 521, in get_loc
return self._range.index(new_key)
^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: 0 is not in range
Thanks very much for sharing this, it was very helpful! FWIW, this is my version, updating old entity ids instead of delete/appending. Use at your own risk of course, Backup your DB first. Error handling is kind of cruddy. I run this interactively via the pyscript kernel. import pandas as pd import sqlite3 import pandas as pd con = sqlite3...