You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
I don't have smart meters to register power consuptiom from, so I import statistics regularly from a centralized repository where I can get power consumption values. This means that only a few days are covered by statistics - and always in the past.
The first import is ok (the system was clean before, no data present). However, subsequent imports will produce negative values in recent periods. To fix that I have to:
delete all sensors data from states, statistics, statistics_short_term
remove entity state from .storage/core.restore_state
Is there a way to do that from this integration? I'm willing to implement that myself, but first I'd like to know what you think about it and maybe if you think there is a easier workaround.
Thanks!
Describe the solution you'd like
I'd like to delete all sensors data before doing an import - or an alternate way to have accumulated statistics by HA not interfere with imported past data.
Describe alternatives you've considered
Maybe artificially filling the CSV data to provide every hours of every day (repeating the previous value) so there are no gaps in the data?
Additional context
None that I think of.
The text was updated successfully, but these errors were encountered:
I do not think that deleting all data is a good approach. Probably there is an issue with wrong values for sum and/or state, there are already many posts in the HA forum and/or issues here. When importing new values, you have to make sure that you start from the last existing value, and the values always increase monotonic. To automate this would be a valuable feature, if you can contribute this, that would be great.
Checklist
Is your feature request related to a problem? Please describe.
I don't have smart meters to register power consuptiom from, so I import statistics regularly from a centralized repository where I can get power consumption values. This means that only a few days are covered by statistics - and always in the past.
The first import is ok (the system was clean before, no data present). However, subsequent imports will produce negative values in recent periods. To fix that I have to:
.storage/core.restore_state
Is there a way to do that from this integration? I'm willing to implement that myself, but first I'd like to know what you think about it and maybe if you think there is a easier workaround.
Thanks!
Describe the solution you'd like
I'd like to delete all sensors data before doing an import - or an alternate way to have accumulated statistics by HA not interfere with imported past data.
Describe alternatives you've considered
Maybe artificially filling the CSV data to provide every hours of every day (repeating the previous value) so there are no gaps in the data?
Additional context
None that I think of.
The text was updated successfully, but these errors were encountered: