I’m trying to get the max current over a 24 hour period. As shown in the graph, it approaches 20 amps, but the max statistics sensor only reports 11.85… the min is also way off…
No difference. And yes, I restarted. I turned on the toaster and microwave and spiked it to 37 amps. It shows the value correctly but the min max values aren’t correct.
If you are getting sensor updates at 10s intervals you need this many samples minimum for a 24 hour window:
24*60*60/10 = 8640 Say 9000 to be sure. For a 48 hour window you would need twice as many samples (18,000).
There is an attribute of the sensor called buffer_usage_ratio. You need this to be close to 1 but never actually reaching 1 (100% sample buffer used). Keep an eye on it after making the samples change.
That the buffer is full, so it probably had to drop values you needed to get the right result. If you increase to the suggested 18000 samples it should drop below 1 I guess.