diff --git a/configuration/transformations.md b/configuration/transformations.md index 5ee712e25e..3d1dc92e84 100644 --- a/configuration/transformations.md +++ b/configuration/transformations.md @@ -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 @@ -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: @@ -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.