You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/devices/plugins.mdx
+32-1Lines changed: 32 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -484,9 +484,15 @@ charger:
484
484
// maxcurrent Variable ist automatisch verfügbar
485
485
```
486
486
487
-
#### Input-Transformationen verwenden
487
+
#### Input- und Output-Transformationen {#transformations}
488
+
489
+
Die `go` und `js` Plugins unterstützen `in` und `out` Parameter, um Daten aus anderen Quellen als Variablen im Script zu verwenden bzw. das Ergebnis an andere Plugins weiterzuleiten.
490
+
491
+
##### Input-Transformationen (`in`)
488
492
489
493
Mit dem `in` Parameter können Werte aus anderen Quellen als Variablen im Script verwendet werden.
494
+
Jeder Eintrag benötigt `name` (Variablenname im Script), `type` (`bool`, `int`, `float`, `string`) und `config` (Plugin-Konfiguration).
495
+
490
496
Dieses Beispiel zeigt eine bedingte Logik, die mit den einfachen Calc-Operationen nicht möglich ist:
491
497
492
498
```yaml
@@ -514,6 +520,29 @@ power:
514
520
value: false
515
521
```
516
522
523
+
##### Output-Transformationen (`out`)
524
+
525
+
Mit dem `out` Parameter kann das Ergebnis eines Scripts an andere Plugins weitergeleitet werden.
526
+
Dies ist besonders nützlich im Schreibkontext, wenn das Script-Ergebnis z. B. per MQTT oder HTTP weiterverarbeitet werden soll.
527
+
Jeder Eintrag benötigt `name`, `type` und `config` — analog zu `in`.
Copy file name to clipboardExpand all lines: i18n/en/docusaurus-plugin-content-docs/current/devices/plugins.mdx
+32-1Lines changed: 32 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -484,9 +484,15 @@ charger:
484
484
// maxcurrent variable is automatically available
485
485
```
486
486
487
-
#### Using Input Transformations
487
+
#### Input and Output Transformations {#transformations}
488
+
489
+
The `go` and `js` plugins support `in` and `out` parameters to use values from other sources as variables in the script or to forward the script result to other plugins.
490
+
491
+
##### Input Transformations (`in`)
488
492
489
493
The `in` parameter allows you to use values from other sources as variables in your script.
494
+
Each entry requires `name` (variable name in the script), `type` (`bool`, `int`, `float`, `string`) and `config` (plugin configuration).
495
+
490
496
This example shows conditional logic that cannot be achieved with simple Calc operations:
491
497
492
498
```yaml
@@ -514,6 +520,29 @@ power:
514
520
value: false
515
521
```
516
522
523
+
##### Output Transformations (`out`)
524
+
525
+
The `out` parameter forwards the script result to other plugins.
526
+
This is particularly useful in a writing context, e.g. when the script result should be further processed via MQTT or HTTP.
527
+
Each entry requires `name`, `type` and `config` — analogous to `in`.
0 commit comments