Moving average for energy dashboard

Hi there,

I would like to request a very nice feature that not many know but can be very useful for indicating if you use more or less energy over time. I think it will not be very complex to add to HA.

In home assistant we have an energy dashboard with insights in daily power consumption. Nice but it can be much more useful with a simple addition.

The feature i would like to request is moving average. Electricity and natural gas consumption is influenced by weather/seasonal effects. These effects can be filterered out off the data by using moving average.

For example:
I download my smart meter monthly consumption values from time to time from slimmemeterportal. From this data i create for every month the average consumption of that month including the 11 months before. I plot these values in a graph. Every plotted point had thus data from a whole year (divided by 12). And you can thus directly see if usage is increasing or decreasing. See the attached image as an example.

You can do this with montly data but also with daily data. The benefit of doing this with daily data is that changes can be seen much faster and you do not have to wait for the month to pass.

These insights give a huge potential for energy savings and users can see the effects of adjustments within a couple of days/weeks.

How is this a feature request

(a) when you have clearly already implemented it; and
(b) there is this Filter - Home Assistant

Well, the graph i showed was from excel.

I looked at the filter. Will try this approach. Not very fond of doing this in the configuration file. Hoped that is would be a little more elegant. But maybe it is not that complicated, i will see.

If I understand the post correctly, this is a moving average over a year. the filter entity mentioned uses recorder, which typically only holds the data for little over a week, and should not be set to keep years. Also there is a warning there for long periods of time, and setting up a sensow would take a year to get a full year cycle. So currently this is more something that advanced graphing tools would do. I assume Grafana could do, but not standard Home Assistant.

Personally this would be of little use to me on account of the solar panels unpredictable behavior and canceling out some of the energy use, and that of charging my electric car. People with a heat pump would also have very much weather influence on account of cold and warm years. But if you don’t have any of those, it might be useful.