Graph with moving average, just like lovelace does on default dashboard


I have zigbee switchs controlling electric heaters, with embedded power consumption monitoring. Everything is perfectly recognized by ZHA.

The power consumption profile of a heater is a PWM, hence it is quite difficult when looking at a large time range (eg. one day) to tell whether it consumes little or lots of electricity, as shown hereunder from the “history” view of the entity

However, from the lovelace home screen, if I just click once on the entity, a subwindow appears and a very relevant moving average is automatically displayed:

How is it possible to instantiate this kind of view in a custom dashboard?
I tried the different cards plotting a sensor, but found nothing like this.

I looked on the internet, and only found ways of creating extra information into the HA database (using low-pass filter for instance), but I could not get satisfying results (the sensor does not have regular updates), but I suppose that anyway there is a possibility for HA to automatically compute on-the-fly the average upon plotting, instead of having to fill the database with extra statistics in advance (because that was is already performed by the lovelace default dashboard).

Thanks in advance

Use the Statistics Graph card.

Thank you, I don’t know how I missed that.

1 Like