Lowpass filter only does adjust/recalc if the sensor value changes. If the sensor returns a stable value (lets say solid 0% or 100%) then the value remains at whatever it was at the last change.
How can I trick the lowpass filter to recalc even on stable input so its value approaches solid 0% (or 100%) in the example. see the blue averaged (lowpass) remains 40% even as boiler value is constant 0.
The state of the sensor needs to change, to enforce a re-evaluation.
Changing a state-attribute also counts as a state change.
If the sensor is a template sensor you could just add an attribute “timestamp” with a value of the current time, and update the sensor on a time schedule.
This would trigger a re-evaluation.
This is an example I use as a base for an Integrationssensor, but this should also apply to filter:
Is there a way to get this working with a lowpass filter? I tried but it says force_update is not valid here, I guess that’s only for template sensors. I’m trying to smooth out quick peaks and valleys in a solar power production sensor. The problem is, when the sensor remains at zero for a long time, the filtered sensor never updates.