Hello, I’d like to compute for how long was a sensor on for last 24h. At the moment:
- I’ve a numerical value of it (0 for off, 1 for on).
- I compute indefinite integral for the value.
I am missing:
- Compute definite integral for last 24h
I’ve tried to create a simple template that calculates current_value - value_before_24h
, but I can’t find how to get the value_before_24h. (Additionally, there is an additional drawback: the integral is updated only when the integrated value is updated. I think I can make a workaround for this.)
Non-solutions:
- Use utility meter. I want to compute if for last 24h, not since the beginning of the day…