From b6546de886c129d12339b132a27e13b197f36e0b Mon Sep 17 00:00:00 2001 From: jimtng <2554958+jimtng@users.noreply.github.com> Date: Mon, 19 Aug 2024 03:32:23 +1000 Subject: [PATCH] Add clarifications about blank settings in Script Transformation Profile configurations (#2350) Signed-off-by: Jimmy Tanagra --- configuration/transformations.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/configuration/transformations.md b/configuration/transformations.md index 413bcc4941..5ee712e25e 100644 --- a/configuration/transformations.md +++ b/configuration/transformations.md @@ -191,6 +191,11 @@ The script transformation is also available as profile. When acting as transform | `commandFromItemScript` | The `script identifier` for performing transformations of **commands** from the item to the Thing handler. | | `stateFromItemScript` | The `script identifier` for performing transformations of **state updates** from the item to the Thing handler. | +When a script is not provided, the input for that parameter's action will be discarded, similar to when a script returned a `null` value. +So be sure to provide a pass-through script for the relevant parameter as necessary. +A simple inline script would work fine, e.g. `|input` would work for `JS`, `RB` and `GROOVY` scripting. +However, beware that `stateFromItemScript` _should_ be left blank, because normally state updates aren't sent to the Thing, unless there is a specific reason otherwise. + Example usage in an `.items` file: ```xtend