Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[basicprofiles] Fix StateFilterProfile to use linked Item system unit #18144

Open
wants to merge 28 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 27 commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
b905a03
[basicprofiles] Improve StateFilterProfile unit based calculations
andrewfg Jan 20, 2025
b440dbb
formatting
andrewfg Jan 20, 2025
fca17b5
work in progress; some test still fail
andrewfg Jan 22, 2025
0e44b67
revert toList
andrewfg Jan 22, 2025
f156748
fix unit tests
andrewfg Jan 23, 2025
a3051d1
work in progress
andrewfg Jan 23, 2025
a995800
Merge remote-tracking branch 'upstream/main' into statefilter-functions
andrewfg Jan 23, 2025
baf9679
add todo
andrewfg Jan 23, 2025
75b3040
[basicprofiles] add invertible unit tests
andrewfg Jan 24, 2025
563c972
[basicprofiles] work in progress
andrewfg Jan 24, 2025
93ba80c
Merge branch 'main' into statefilter-functions
andrewfg Jan 24, 2025
90237fa
[basicprofiles] fix invertible unit calculations
andrewfg Jan 24, 2025
bf1b250
[basicprofiles] fix comment
andrewfg Jan 24, 2025
065a280
[basicprofiles] add time tests
andrewfg Jan 24, 2025
1cb58bd
[basicprofiles] optimise calculate and method order
andrewfg Jan 25, 2025
e11c8ba
Merge branch 'openhab:main' into statefilter-functions
andrewfg Jan 27, 2025
20b0a5e
readme and pre- merge prior PRs
andrewfg Jan 27, 2025
4a92b76
revert log message
andrewfg Jan 27, 2025
7a4a916
Merge branch 'openhab:main' into statefilter-functions
andrewfg Feb 1, 2025
4f6b04c
filter previousStates for DecimalType only
andrewfg Feb 3, 2025
3449378
Merge branch 'main' into statefilter-functions
andrewfg Feb 4, 2025
f497591
align with prior PRs
andrewfg Feb 4, 2025
b36852c
work in progress
andrewfg Feb 7, 2025
274b681
fix junit test failures
andrewfg Feb 8, 2025
3e708e2
eliminate dependency on OH core PR
andrewfg Feb 8, 2025
519e884
Merge branch 'main' into statefilter-functions
andrewfg Feb 9, 2025
8dae92e
fix merge conflict
andrewfg Feb 9, 2025
bcb1445
work in progress
andrewfg Feb 9, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions bundles/org.openhab.transform.basicprofiles/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,10 @@ The `LHS_OPERAND` and the `RHS_OPERAND` can be either one of these:
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.
All the functions except `$DELTA` support a custom window size.

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.
Note: if the binding sends a value that cannot be converted to the Unit of the linked Item, then that value is excluded.
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.

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`.
When `LHS_OPERAND` is omitted, e.g. `> 10, < 100`, the comparisons are applied against the input data from the binding.
The `RHS_OPERAND` can be any of the valid values listed above.
Expand Down
Loading