HASS Helper Filter - energy outlier

Hi,

I’m trying to filter an energy reading that occasionally reports an invalid value:

I’ve been using a filter helper but apparently that didn’t work.
I was using a filter window of 3 radius of 100. I’ve now changed it to 10 and 10 respectively:

I’m noticing that the filter is not applying to past data:

Any tips on how to setup the filter and have it apply to previous data would be appreciated, thanks!

A couple more images of the difference the filter made so far:

Thanks :green_heart:

There are no filters that retroactively alter previously recorded states.Also you have to be careful with the outlier filter, especially if the erroneous values occur after a HA restart. The filter will initially record the outlier as the baseline to compare new values to.

Which integration is providing this entity?

Is it a template sensor or something that uses a value template?

It would be better to get the data fixed at the source.

Hi Tom,

So it’s a Zigbee power meter socket with Zigbee2MQTT. Sometimes it happens when the device is powered but mostly randomly.
I’m now just waiting with a larger window size and smaller radius :crossed_fingers:

I was really hoping for a way to apply the filter to past data so I could just swap entity in the home energy dashboard.