This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | |||
manual:config:triggers:expression [2019/01/17 10:30] martins-v numbers with a '+' sign are not supported |
manual:config:triggers:expression [2019/07/08 05:43] (current) martins-v 'sum' is evaluated starting with the first received value |
||
---|---|---|---|
Line 21: | Line 21: | ||
^FUNCTION CALL^MEANING^ | ^FUNCTION CALL^MEANING^ | ||
- | |**sum(600)** |Sum of all values within 600 seconds| | + | |**sum(600)** |Sum of all values in no more than the latest 600 seconds| |
- | |**sum(#5)** |Sum of the last 5 values| | + | |**sum(#5)** |Sum of all values in no more than the last 5 values| |
The function **last** uses a different meaning for values when prefixed with the hash mark - it makes it choose the n-th previous value, so given the values 3, 7, 2, 6, 5 (from most recent to least recent), **last(#2)** would return //7// and **last(#5)** would return //5//. | The function **last** uses a different meaning for values when prefixed with the hash mark - it makes it choose the n-th previous value, so given the values 3, 7, 2, 6, 5 (from most recent to least recent), **last(#2)** would return //7// and **last(#5)** would return //5//. |