Skip to content

Commit

Permalink
median documentation
Browse files Browse the repository at this point in the history
Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
  • Loading branch information
mherwege committed Aug 27, 2024
1 parent 45628b8 commit 2c65d5b
Show file tree
Hide file tree
Showing 2 changed files with 66 additions and 63 deletions.
14 changes: 7 additions & 7 deletions configuration/items.md
Original file line number Diff line number Diff line change
Expand Up @@ -501,13 +501,13 @@ Group[:itemtype[:function]] groupname ["labeltext"] [<iconname>] [(group1, group

Group state aggregation functions can be any of the following:

| | Function | Parameters | Base Item | Description | |
| --- | -------------------------- | ----------------------------- | ------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --- |
| | `EQUALITY` | - | \<all\> | Default if no function is specified. Sets the state of the members if all have equal state. Otherwise `UNDEF` is set. In the Item DSL `EQUALITY` is the default and may be omitted. | |
| | `AND`, `OR`, `NAND`, `NOR` | <activeState>, <passiveState> | \<all\> (must match active & passive state) | [Boolean](https://en.wikipedia.org/wiki/Boolean_algebra) operation. Sets the \<activeState\>, if the members state \<activeState\> evaluates to `true` under the boolean term. Otherwise the \<passiveState\> is set. | |
| | `SUM`, `AVG`, `MIN`, `MAX` | - | Number | [Arithmetic](https://en.wikipedia.org/wiki/Arithmetic) operation. Sets the state according to the arithmetic function over all members states. | |
| | `COUNT` | <regular expression> | Number | Sets the state to the number of members matching the given regular expression with their states. | |
| | `LATEST`, `EARLIEST` | - | DateTime | Sets the state to the latest/earliest date from all members states | |
| | Function | Parameters | Base Item | Description | |
| --- | ------------------------------------ | ----------------------------- | ------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --- |
| | `EQUALITY` | - | \<all\> | Default if no function is specified. Sets the state of the members if all have equal state. Otherwise `UNDEF` is set. In the Item DSL `EQUALITY` is the default and may be omitted. | |
| | `AND`, `OR`, `NAND`, `NOR` | <activeState>, <passiveState> | \<all\> (must match active & passive state) | [Boolean](https://en.wikipedia.org/wiki/Boolean_algebra) operation. Sets the \<activeState\>, if the members state \<activeState\> evaluates to `true` under the boolean term. Otherwise the \<passiveState\> is set. | |
| | `SUM`, `AVG`, `MEDIAN`, `MIN`, `MAX` | - | Number | [Arithmetic](https://en.wikipedia.org/wiki/Arithmetic) operation. Sets the state according to the arithmetic function over all members states. | |
| | `COUNT` | <regular expression> | Number | Sets the state to the number of members matching the given regular expression with their states. | |
| | `LATEST`, `EARLIEST` | - | DateTime | Sets the state to the latest/earliest date from all members states | |

Boolean group state functions additionally return a number representing the count of member Items of value 'value1' (see example below).

Expand Down
Loading

0 comments on commit 2c65d5b

Please sign in to comment.