Skip to content

Commit

Permalink
Add usage information for openhab transformations
Browse files Browse the repository at this point in the history
Signed-off-by: Jimmy Tanagra <[email protected]>
  • Loading branch information
jimtng committed Sep 4, 2023
1 parent 27f019b commit 6fe054b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions USAGE.md
Original file line number Diff line number Diff line change
Expand Up @@ -1252,6 +1252,14 @@ end

### Transformations

#### Using openHAB Transformations <!-- omit from toc -->

Although it can often be done better and more easily in native Ruby code, existing openHAB transformations
such as MAP, JSONPATH, Jinja Transformation, or even Ruby transformation written in the `/transform` folder
can also be used by calling the {OpenHAB::DSL.transform transform} method.

#### Writing Custom Transformations in Ruby <!-- omit from toc -->

This add-on also provides the necessary infrastructure to use Ruby for writing [transformations](https://www.openhab.org/docs/configuration/transformations.html).

The main value to be transformed is given to the script in a variable called `input`.
Expand Down

0 comments on commit 6fe054b

Please sign in to comment.