As I said this works. What I’d like to do is have each data point returned as raw data and also calculate the average over the last hour and the average over that last 24 hours.
What’s the best way to accomplish this? I’d like to have all three values (raw, 1 hour avg, 24 hour avg) available in Home Assistant. I’ve started to look into Template Sensors but haven’t completely figured them out yet but it seems like the route to go.
The derivatives look interesting. I may look into integrating them into the config.
Looks like a nice display. I’m working my way towards something similar. Assembling things piece by piece.
I ended up adding a Template for each of the averaged values. It seems to be working but it’s only been running for a few minutes so the averages aren’t there yet. Does this seem reasonable or is there something that will cause issues?
The one thing I’d like to change is how the averaged values are triggered. Right now they’re just on a timed interval. Is it possible to trigger them when the source value is updated? So I’d like to trigger the 1 hour average when the Raw value is triggered and the 24 hour average when the 1 hour value is triggered. Seems this would ensure the averages would be using the latest values.
I don’t think so, the time is based off when it is run initially and then the periodicity after that. There could be a complicated way to do in in an automation.