Skip to content

Commit

Permalink
Update transformations.md
Browse files Browse the repository at this point in the history
adding missing (?) commata

Signed-off-by: Eric Bodden <[email protected]>
  • Loading branch information
ericbodden authored Sep 2, 2023
1 parent edadbc6 commit bd893cd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions addons/transformations.md
Original file line number Diff line number Diff line change
Expand Up @@ -193,19 +193,19 @@ The script transformation is also available as profile. When acting as transform
Example usage in an `.items` file:

```xtend
Number <itemName> { channel="<channelUID>"[profile="transform:JS", toItemScript="decode_json.js" toHandlerScript="encode_json.js" ] }
Number <itemName> { channel="<channelUID>"[profile="transform:JS", toItemScript="decode_json.js", toHandlerScript="encode_json.js" ] }
```

Here, additional parameters can also be injected into the script using the URL style syntax, e.g.:

```xtend
Number <itemName> { channel="<channelUID>"[profile="transform:RB", toItemScript="multiply.rb?factor=10" toHandlerScript="multiply.rb?factor=0.1" ] }
Number <itemName> { channel="<channelUID>"[profile="transform:RB", toItemScript="multiply.rb?factor=10", toHandlerScript="multiply.rb?factor=0.1" ] }
```

Inline script is also supported in the profile syntax.

```xtend
Number <itemName> { channel="<channelUID>"[profile="transform:RB", toItemScript="| input.to_f * 10" toHandlerScript="| input.to_f * 0.1" ] }
Number <itemName> { channel="<channelUID>"[profile="transform:RB", toItemScript="| input.to_f * 10", toHandlerScript="| input.to_f * 0.1" ] }
```

More details regarding this and other Transformation services can be found in the individual transformation articles linked below.
Expand Down

0 comments on commit bd893cd

Please sign in to comment.