Skip to content

Commit

Permalink
update doc
Browse files Browse the repository at this point in the history
  • Loading branch information
AlvaroVega committed Jun 30, 2023
1 parent 581f983 commit dd1888e
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions doc/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -190,11 +190,10 @@ Some transformation plugins also allow the use of the following optional fields:
an expression based on a combination of the reported values. See the
[Expression Language definition](#expression-language-support) for details
- **skipValue**: indicates that if the result of applying `expression` to a measure is equal to the value of
`skipValue` then the attribute corresponding to the measure is not sent to CB. In other words, this field **is
not an expression**, it is a value that is compared with the result of applying `expression` to a measure. By
default if `skipValue` is not defined then is considered as `null` (i.e. if the result of apply `expression` results
in `null` then corresponding attribute is not sent to CB). It is only used if `expression` is provided (otherwise is
ignored).
`skipValue` then the attribute corresponding to the measure is not sent to CB. In other words, this field **is not
an expression**, it is a value that is compared with the result of applying `expression` to a measure. By default if
`skipValue` is not defined then is considered as `null` (i.e. if the result of apply `expression` results in `null`
then corresponding attribute is not sent to CB). It is only used if `expression` is provided (otherwise is ignored).
- **entity_name**: the presence of this attribute indicates that the value will not be stored in the original device
entity but in a new entity with an ID given by this attribute. The type of this additional entity can be configured
with the `entity_type` attribute. If no type is configured, the device entity type is used instead. Entity names can
Expand Down Expand Up @@ -521,6 +520,9 @@ expression. In all cases the following data is available to all expressions:
- `subservice`: device subservice
- `staticAttributes`: static attributes defined in the device or config group

Additionally, for attribute expressions (`expression`, `entity_name`) and `entityNameExp` measures are avaiable in the
**context** used to evaluate them.

### Examples of JEXL expressions

The following table shows expressions and their expected outcomes taking into account the following measures at
Expand Down

0 comments on commit dd1888e

Please sign in to comment.