I am trying to get a 10 minute average of an item persisted by influxDB.
I have a rule that looks like this:
rule "Basement Dryer Update"
when
Item SonoffDryer_AmpUsage changed
then
logInfo("Averaging", "Dryer")
N_Dryer10minAverage.postUpdate(SonoffDryer_AmpUsage.averageSince(now.minusMinutes(20)))
end
The value is coming from a SonoffPOW2, which I’m not sure is relevant, but anyway…
Both the updated value and the 10 minute average show the same value on the sitemap. I changed the calculation to a 20 minute average, but that too shows the same value (eliminating how the Sonoff calculates its reported value).
What am I missing? Am I wrong about how persistence should work?
Show your persistence config. Are you sure there’s more than one value persisted in a 10 or 20 minutes timeframe ? Enable persistence debugging to find out.