Hello all,
I recently tried to migrate from SQLite to PostgreSQL database for Home-assistant. For me, it’s most important to be able to transfer energy statistics (electricity and gas usage). I first tried to migrate with pgloader but I had no success due to some errors in the authentication. Then I simply exported Statistics and StatistiscsShortTerm tables to csv format from the SQLite database and imported them back to PostgreSQL. That was a success! I can view all old energy statistics in HA! however when transitioning from imported data to new data I have huge negative consumption…
Why is this the case and how it can be corrected? No entries in the database have negative values.