Add standard deviation calculation to group (#112076)
* Add standard deviation calculation to group * Add missing bits --------- Co-authored-by: G Johansson <goran.johansson@shiftit.se>
This commit is contained in:
parent
8c54587d7e
commit
11f5b48724
4 changed files with 25 additions and 8 deletions
|
@ -48,6 +48,7 @@ MAX_VALUE = max(VALUES)
|
|||
MEAN = statistics.mean(VALUES)
|
||||
MEDIAN = statistics.median(VALUES)
|
||||
RANGE = max(VALUES) - min(VALUES)
|
||||
STDEV = statistics.stdev(VALUES)
|
||||
SUM_VALUE = sum(VALUES)
|
||||
PRODUCT_VALUE = prod(VALUES)
|
||||
|
||||
|
@ -61,6 +62,7 @@ PRODUCT_VALUE = prod(VALUES)
|
|||
("median", MEDIAN, {}),
|
||||
("last", VALUES[2], {ATTR_LAST_ENTITY_ID: "sensor.test_3"}),
|
||||
("range", RANGE, {}),
|
||||
("stdev", STDEV, {}),
|
||||
("sum", SUM_VALUE, {}),
|
||||
("product", PRODUCT_VALUE, {}),
|
||||
],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue