I am currently trying to use the Statistics sensor to smooth out readings from my WeMo insight power readings, this involves first creating a template sensor to get a clean reading and then a statistics sensor set to 3 or 4 readings to smooth out massive spikes.
The problem is when the power draw reaches 0 the WeMo just stops reporting after one last poll… This means the last reading are something like 4.5W, 3,5W, 0W then no more readings. Unfortunately this leaves the mean at 2.7W even though the reading is technically zero from that point on… It is even worse if the device bounces high right before shut off.
Is there any way to cleanly work around this? it seems to be a byproduct of the template and stats sensors being event based and thus when the WeMo stops they stop.
As a work around I only make triggers based on the mean being over a specific amount but it does make for some very odd graphs and possible issues if a device is shut off while running at higher power.