Retrieve and average past values of variables
Posted: Thu May 03, 2018 7:13 am
Is it possible to retrieve and average say, the last 5 stored values of a variable? For instance, I want to compare the most recent period between sump cycles with an average of the last few and alert me if it’s overdue. (Sump failure: the whole reason I started down the home automation path; now I have a whole house full of fun!)
I could do it by storing each of the five most recent in separate variables and updating all of them each cycle but wondered if there was a more elegant & efficient way to do it?
Thanks for any thoughts!
Sent from my iPhone using Tapatalk
I could do it by storing each of the five most recent in separate variables and updating all of them each cycle but wondered if there was a more elegant & efficient way to do it?
Thanks for any thoughts!
Sent from my iPhone using Tapatalk