Skip to content

Commit

Permalink
Add a link to the transformation add-ons page (#2351)
Browse files Browse the repository at this point in the history
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
  • Loading branch information
jimtng committed Aug 19, 2024
1 parent b6546de commit 45628b8
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions configuration/transformations.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,15 @@ They are often useful, to **interpret received Item values**, like sensor readin
- Processing of a raw Item value, e.g., Parsing a number from a JSON string, like `{ "temperature": 23.2 }`
- Conversion of sensor readings, e.g., temperature in degree Celsius can be converted to degree Fahrenheit

## Installation

Transformations are performed by Transformation Services which are available as [transformation add-ons](/addons/#transform).
The relevant add-on needs to be installed via the Main UI or addons.cfg before use.

## Usage

Transformations are applicable in Item and Sitemap element labels and inside DSL rules.
The relevant transformation service needs to be installed via the Main UI or addons.cfg before use.
Be aware, that some Transformation services rely on transformation files, while others work by directly providing the transformation logic.
Some Transformation services rely on transformation files, while others work by directly providing the transformation logic.
Transformation files need to be placed in the directory `$OPENHAB_CONF/transform`.

1. Item and Sitemap Labels
Expand All @@ -37,7 +41,7 @@ Transformation files need to be placed in the directory `$OPENHAB_CONF/transform

Usage of Transformations in the [label parameter of Sitemap elements]({{base}}/ui/sitemaps.html#element-type-text) works the same way.

1. Rules
2. Rules

Transformations can also be [used in rules]({{base}}/configuration/rules-dsl.html#transformations) to transform/translate/convert data.
The following shows three examples:
Expand All @@ -48,12 +52,12 @@ Transformation files need to be placed in the directory `$OPENHAB_CONF/transform
var fahrenheit = transform("JS", "convert-C-to-F.js", temperature)
```

1. Bindings
3. Bindings

Transformations can sometimes be used in binding add-ons. For example, transforming an openHAB ON command into "action=powerup" for sending to a device.
If, and how, this use may be available is described in individual binding documentation.

1. Profiles
4. Profiles

Transformations can be associated with channels, working on data being passed between bindings and Items. See [profile documentation]({{base}}/configuration/items.html#profiles) for more detail.

Expand Down

0 comments on commit 45628b8

Please sign in to comment.