WARNING (Recorder) [homeassistant.components.sensor.recorder] The unit of sensor.ht_equalizer_import_energy_cost (NOK) does not match the unit of already compiled statistics (EUR). Generation of long term statistics will be suppressed unless the unit changes back to EUR
So i need to clean out the log term stats with EUR, how do i do that?
Recorder: Purge Entities and Recorder: Purge will not work on this issue.
Recorder is using mariadb in my case.
iam using mariadb not sqlite. there are no documentation on the structure of the db, editing it in the blind will almost certain result in lots of pain, my db is large, extremly large, it is almost 4 GB.
That’s because there is no DB structure. It’s basically used as a flat file. Most of the information recorded for a state change, for example, is redundant entity name and attributes. If you open it up and take a look you’ll probably be shocked at how terrible it is.
That’s why we have 4+ GB databases to record 400K worth of data.
with SQLite Web add-on, I have changed mine from USD to EUR :
UPDATE "statistics_meta" SET unit_of_measurement='EUR' WHERE statistic_id = 'sensor.xxx_cost'
‘sensor.xxx_cost’ being the totalizing cost sensor you’d like to move to another currency.
you can search for the “*cost” entities you may have for instance with below statement:
SELECT *
FROM "statistics_meta" WHERE statistic_id LIKE "%_cost"