i’m recording some values in a variable which changes a lot (outside temp, current power usage of my house). To get avarage values or sums i’m currently working with rules and tons of variables.
So i’m asking myself if there is a smarter way. All values are stored in the database.
Is there a way to use these in a variable, maybe as a reg ex?
- $variable1(sum of last hour/day/week…)
- $variable2(average of last hour/day/week…)
- $variable3(max of last…)
- $variable4(min of last…)