Spread energy readings over time

Is it possible to spread energy reading over time?

My setup: I take manual readings at irregular intervals (days, weeks or even months) into a input_number which then is used as input for a template sensor and an utility meter. Same holds true if one got a smart Meter that takes readings in large intervals.

These readings show up as one big bar in the energy dashboard at the moment I took them.
Obviously this does not reflect the reality where it is more probable that the energy/water/gas has been used approximately evenly during the period between the last reading and the current reading.

Is there a way to split up the reading into equal steps and spread them over time between the two readings? It would make sense to define an adequate interval (hour or day) which each gets one chunk of the total difference between readings. Could it be done in UI (energy dashboard only) or by updating past statistics of the sensor?

I have a similar situaiton for my water consumption, sometimes weekly, sometime a month later. However, I did find it is not (!) euqally distributed and for that I am happy too…it is a finding and else I would not even bother measuring. You can use averages but this will not backupdate the long term stats and that is where the issue lies. For me it would be sufficient to show it on a graph with wich ‘avergae’ functionality I would be happy…so not needing to averagee-out stats in the db

Hi vingerha,

Sorry I am not sure if you are looking for a solution or if you are happy with the way it currently works.

I would be happy with a UI only way as well. No need to change the statistics in the past if the other way around is easier.

I am looking for something but … I have given it a few more thoughts on below water graph
From May to end of June consumption seems stable, from July till mid september it rises (pool need topping up during hot period) and since then it is stabilising. Yoiu Notice that I did not measure anything between July and September
What is missing (for me) is the moments that I top up the pool, i.e. adding 10-15m3 and the only solution would be: increase frequency.
By averaging figures into real values one creates fake data which I personally donot like or need but making ‘trend’ visible is something else, so I redid this with apexcharts.
Maybe you can explain what would not be ok for you and why (trying to understand)

Statistic graph
image

Reworked with statistics in apexcharts

Hi,

I agree having such an increasing statistic chart is nice but I really like the idea of using the energy dashboard with an overview of all consumptions.

I actually also have the “problem” with my water readings which currently look like this:

For me it would make more sense to have something like that (sorry for the hand drawing):

Clear, but that is only for visual effect then as you have no clue how to distribute, by doing it like above you will at least see ‘some’ consumption when you browse through days which had no measure…I get the idea.
The only option I see is to write SQL that updates the data. From a HA persective I (me) would not provide this as HA should use/trust the data as it is entered…so you probably have to build it yourselves. The SQL that HA provides does not allow updates so has to become a python-based thingy I guess

EDIT: as a suggestion, I would create a second set of long-term statistics that calculate it based on the original entries, then you have both…on data-volume this is not an issue at all.

Not sure if I’ll have time to implement something like that. But thanks for your suggestions!

I know and understand, I would try to simulate it with apexcharts as a alternative. For me this is not a prio at all as I will not change my consumption whatever the reading says…am already quite conscious after years of changing habits … and the rest I see as a luxury I can afford