Transformation

Overview

The transform allows to change a value before publishing it or using in a callback.

The Expression language is used to define the transformation.

Some usage examples of transformations:

  • Converts a temperature from °F to °C

    div(mul(sub(value, 32), 5), 9)
    
  • Changes a state base on a threshold

    cond(gte(value, 10), true, false)
    

Usage

On Value

Pre transform

A pre-transformation can be configured on a value to convert it before it is being propagated further. To change the type of the value, the field transformType is mandatory.

Warning

This feature is not supported by all modules see modules capabilities for modules support

Note

If the type of a value is modified, the following pulse must use the same type for it’s reset value.

Post transform

A post-transformation can be configured on a value so that the value is converted before being transmitted. To change the type of the value, the field transformType is mandatory.

Warning

This feature is not supported by all modules see modules capabilities for modules support

Note

If the type of the value is modified, it must be the same as the final type of the value.

On Callback

A transformation can be configured on a transform callback to change the value sent to the targeted Output.