I have an interesting problem.
In Solax integration we used to have two sensors misslabeled - same metric daily reset and total increasing were switched, both marked as total increasing.
This situation was corrected in the patch in library used by solax integration and with recent bump - released.
This however caused my energy dashboard go haywire after the upgrade, I restored the backup, deleted the solax device, re-added it, and now - the conclusion.
My history is utterly bonkers take a look:
I’d like to fix that, now I have 3 entities:
A. consumed total - containing proper total aggregated value… …just since today
B. consumed today - new entity, contain daily reset value, no history, just today
C. consumed (without total or today as a postfix) old entity, no longer provided by integration, renamed in library to today - no new values, but contains the history that I should have in consumed total now.
I’m fairly proficient with database edits, working mosltly with MariaDB for past few years, but, quoting classics “how hard can it be”?
Would anyone here have any advice where to start cleaning that mess (I made myself) up?
I’d like to:
- update the records of A before today a history of B (that contain no data before today as newly provided sensor after integration update)
- move (update?) data from C (as it contain proper total increasing data) as a pre-today records for A
Does it make sense?