Skip to content

Commit eedecc4

Browse files
authored
Updated docs for min/max support calc plugin (#917)
1 parent de1324b commit eedecc4

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

docs/devices/plugins.mdx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -616,13 +616,17 @@ mul:
616616
...
617617
```
618618

619-
Als Operanden werden dabei die Grundrechenarten Addition (`add`) und Multiplikation (`mul`) unterstützt.
619+
Als Operanden werden dabei die Grundrechenarten Addition (`add`), Multiplikation (`mul`) unterstützt, Division (`div`), Vorzeichenumkehr (`sign`), Absolutwert (`abs`), Minimalwert (`min`) und Maximalwert (`max`) unterstützt.
620620

621621
Mit `scale: -1` bei einem der Werte kann eine einfache Subtraktion durchgeführt werden, mit `scale: 0.001` eine Division z. B. zur Konvertierung von kWh in Wh.
622622

623623
Mit `sign:` (jede positive Zahl wird zu +1, jede negative Zahl wird zu -1, 0 bleibt 0) können (in Verbindung mit `mul`) Vorzeichen auf andere Werte übertragen werden.
624624
Z. B. um bei Zählern die „Richtung“ der Leistung (Einspeisung oder Bezug) auf die gemessenen Ströme zu übertragen.
625625

626+
Mit `abs:` wird der Absolutwert einer Zahl berechnet.
627+
628+
Mit `min:` und `max:` wird der Minimalwert bzw. der Maximalwert berechnet.
629+
626630
Das `calc` Plugin ist hilfreich um z. B.
627631

628632
- Leistungswerte von einzelnen PV-Strings zu summieren (addieren)

i18n/en/docusaurus-plugin-content-docs/current/devices/plugins.mdx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -616,13 +616,17 @@ mul:
616616
...
617617
```
618618

619-
The basic arithmetic operations addition (`add`) and multiplication (`mul`) are supported as operands.
619+
The basic arithmetic operations addition (add), multiplication (mul), division (div), sign inversion (sign), absolute value (abs), minimum value (min) and maximum value (max) are supported as operands.
620620

621621
With `scale: -1` on one of the values, simple subtraction can be performed, with `scale: 0.001` division, e.g. for converting kWh to Wh.
622622

623623
With `sign:` (every positive number becomes +1, every negative number becomes -1, 0 remains 0), signs can be transferred to other values (in conjunction with `mul`).
624624
E.g. to transfer the "direction" of power (feed-in or consumption) to the measured currents for meters.
625625

626+
With `abs:`, the absolute value of a number is calculated.
627+
628+
With `min:` and `max:` the minimum value respectively the maximum value will be calculated.
629+
626630
The `calc` plugin is helpful for e.g.
627631

628632
- Summing power values from individual PV strings (addition)

0 commit comments

Comments
 (0)