Mimic statistics-graph, add min/max/mean aggregation #75
Replies: 5 comments 23 replies
-
I just filed #77 to have long-term statistics support, because the vanilla statistics graph card does not compute nor aggregate this data but relies on the backend statistics. |
Beta Was this translation helpful? Give feedback.
-
Yeah, I guess I'll have to sooner or later bite the bullet and implement both pre-made filters and long term statistics support. |
Beta Was this translation helpful? Give feedback.
-
@r-jean-pierre plotly now can fetch long-term statistics for you to play with. |
Beta Was this translation helpful? Give feedback.
-
So I played with it and it's exactly what I expected! On the left the new statistic of plotly-graph (min-mean-max), and on right the statistics-graph component Again: a huge "thank you!" |
Beta Was this translation helpful? Give feedback.
-
BTW, next release of HA will add a "week" period for statistics, and it seems things are moving toward the ability to import data into statistics from other sources (say your electricity bills from 10 years ago). |
Beta Was this translation helpful? Give feedback.
-
Dear all,
I discovered recently this custom:plotly-graph. I would like to "replicate" what statistics-graph is able to do by displaying min/mean/max of a sensor. As the final result is quite beautiful, there is no way to really tweak statistics-graph or to have an hand on how statistics are computed.
Here is where I am:
Obviously I used the trick
line: shape: spline
to smooth a bit the original raw data on the bottom plotly graph, but how to really control an aggregation such as min/mean/max over 8H without too much pain :-) as in the top graph?
I already saw a piece of code to average over M minutes, but it seems tricky (or probably not sustainable) and doesn't compute well for first & last valuers of the time series (well, maybe for that part it's just because I'm not good in coding/maths :-) )
Anyhow, it will required to code min & max and add to any sensor and handle may degenerate cases
Any magic command to do it without an headache and a 10MB yaml file?
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions