Proper time based Average sensor

Hello,

Does anybody know if this custom component :

Is still the way to go to get a proper average over time ? :slight_smile:

Last time I checked (months ago…), the HA built-in average tools were not able to take time in consideration and only produced average of different values (all values having the same ‘weight’).
For instance : if a sensor gives the value 0 for one hour and then the value 10 for the next 9 hours, the average computation will simply give a result of 5 = (0+10)/2.

In many cases the time factor has to be taken into consideration to get a meaningfull result. With the upper example, the expected time-base average would be 9 = (01 + 109) / 10.

Thanks,
David

So I guess it’s still the way to go and will keep it for now ! :slight_smile: