Skip to content

Commit 574d573

Browse files
authored
[basicprofiles] Small improvement to documentation (openhab#18290)
* [basicprofiles] minor improvement to read me Signed-off-by: Andrew Fiddian-Green <[email protected]>
1 parent 222fccd commit 574d573

File tree

1 file changed

+4
-2
lines changed
  • bundles/org.openhab.transform.basicprofiles

1 file changed

+4
-2
lines changed

bundles/org.openhab.transform.basicprofiles/README.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -242,8 +242,10 @@ The `LHS_OPERAND` and the `RHS_OPERAND` can be either one of these:
242242
This can be customized by specifying the "window size" or sample count applicable to the function, e.g. `$MEDIAN(10)` will return the median of the last 10 values.
243243
All the functions except `$DELTA` support a custom window size.
244244

245-
In the case of comparisons and calculations involving `QuantityType` values, all the values are converted to the Unit of the linked Item before the calculation and/or comparison is done.
246-
Note: if the binding sends a value that cannot be converted to the Unit of the linked Item, then that value is excluded.
245+
In the case of comparisons and calculations involving `QuantityType` values, both operands, whether they are Item states, the incoming value, or constants, must be of the same type and have compatible units.
246+
In other words a comparison between a `QuantityType` operand and an incoming `DecimalType` value (or vice versa) will fail.
247+
All `QuantityType` values are converted to the Unit of the linked Item before the calculation and/or comparison is done.
248+
So if the binding sends a value that cannot be converted to the Unit of the linked Item, then that value is excluded.
247249
e.g. if the linked item has a Unit of `Units.METRE` and the binding sends a value of `Units.CELSIUS` then the value is ignored.
248250

249251
The state of one item can be compared against the state of another item by having item names on both sides of the comparison, e.g.: `Item1 > Item2`.

0 commit comments

Comments
 (0)