I have an utility helper (created in UI), yet realized that the input values are incorrect at times, so I created a filtered sensor entity. (in my case sensor.solar_day_energy_from_grid_filtered)
How/where can I change the source of the utility helper from the original to the newly filtered entity, thereby preserving the utility history.
I must be looking at the wrong place - cannot find it
It’s not obvious, but UTILITY METER OPTIONS in the settings panel - which looks like a heading - is actually a link which allows you to change the source.
Thanks, I found it. It accepts it if I change the source yet I get an error message thereafter : This entity is no longer being provided by the utility_meter integration. If the entity is no longer in use, delete it in settings.
Thanks, yes, most recent HA (I’ve edited my former response)
Now I’m screwed. The helper lost its “utility” property, and no matter what I do now, even changing it back to the original entry, it its utility characteristics is gone
in other words, my I just screwed up my entire energy statistics…
Now I’m really lost. I installed the new version (2023.3.2 → 2023.3.3) and the previously non-functional helper are back in function.
Now my energy board has
entries before March 5 : consumed energy from the original helper
entries between March 6 and March 9 : entries from the filtered helpers (the original were non-functional) (March 5 is where I changed the config, hence a “hybrid”)
entries March 10 and after : the sum of original and filtered helpers (the original ones recovered)
How getting this back in order : somehow I have to make the non-filtered helpers non-functional anymore - and tweak the content of the DB so those entries get removed after March 5.
Any other idea? Is there any docu about the database structure and rules (which values are re-calculated)
somewhat fixed. I changed all historic entries to solar_day_energy_into_grid filtered and from_grid_filtered respectively.
Then removed the non-filtered entries from the energy board.
update statistics
set metadata_id = 150
where metadata_id = 128
and start_ts < 1677862800.0
;
update statistics
set metadata_id = 151
where metadata_id = 129
and start_ts < 1677862800.0
;
update statistics
set sum = sum + 5141339
where metadata_id = 150
and start_ts >= 1677862799 --- 3.3. 17:00
and sum < 5142247 --- this line for safety only
;
update statistics
set sum = sum + 554817
where metadata_id = 151
and start_ts >= 1677862799
and sum < 554817 --- this line for safety only
;
and rectify the short_term statistics (check whether you need to set a date window here as well)
update statistics_short_term
set sum = sum + 5145293
where metadata_id = 150
;
update statistics_short_term
set sum = sum + 586090
where metadata_id = 151
;