-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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] StateFilterProfile uses linked Item system unit #18144
Open
andrewfg
wants to merge
19
commits into
openhab:main
Choose a base branch
from
andrewfg:statefilter-functions
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+456
−97
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Signed-off-by: Andrew Fiddian-Green <[email protected]>
andrewfg
added
the
enhancement
An enhancement or new feature for an existing add-on
label
Jan 20, 2025
Signed-off-by: Andrew Fiddian-Green <[email protected]>
andrewfg
changed the title
[basicprofiles] Improve StateFilterProfile unit based calculations
[basicprofiles] Normalise StateFilterProfile calculations to use the linked Item's Unit
Jan 21, 2025
andrewfg
changed the title
[basicprofiles] Normalise StateFilterProfile calculations to use the linked Item's Unit
[basicprofiles] Normalise StateFilterProfile calculations to use linked Item's Unit
Jan 21, 2025
Signed-off-by: Andrew Fiddian-Green <[email protected]>
Signed-off-by: Andrew Fiddian-Green <[email protected]>
Signed-off-by: Andrew Fiddian-Green <[email protected]>
Signed-off-by: Andrew Fiddian-Green <[email protected]>
andrewfg
changed the title
[basicprofiles] Normalise StateFilterProfile calculations to use linked Item's Unit
[basicprofiles] StateFilterProfile calculations use linked Item's Unit
Jan 23, 2025
Signed-off-by: Andrew Fiddian-Green <[email protected]>
andrewfg
changed the title
[basicprofiles] StateFilterProfile calculations use linked Item's Unit
[basicprofiles] StateFilterProfile calculations use linked Item SystemUnit
Jan 23, 2025
Signed-off-by: Andrew Fiddian-Green <[email protected]>
Signed-off-by: Andrew Fiddian-Green <[email protected]>
Signed-off-by: Andrew Fiddian-Green <[email protected]>
Signed-off-by: Andrew Fiddian-Green <[email protected]>
Signed-off-by: Andrew Fiddian-Green <[email protected]>
andrewfg
changed the title
[basicprofiles] StateFilterProfile calculations use linked Item SystemUnit
[basicprofiles] StateFilterProfile use linked Item SystemUnit
Jan 24, 2025
andrewfg
changed the title
[basicprofiles] StateFilterProfile use linked Item SystemUnit
[basicprofiles] StateFilterProfile uses linked Item SystemUnit
Jan 24, 2025
Signed-off-by: Andrew Fiddian-Green <[email protected]>
Signed-off-by: Andrew Fiddian-Green <[email protected]>
andrewfg
changed the title
[basicprofiles] StateFilterProfile uses linked Item SystemUnit
[basicprofiles] StateFilterProfile uses linked Item system unit
Jan 27, 2025
Signed-off-by: Andrew Fiddian-Green <[email protected]>
andrewfg
added
bug
An unexpected problem or unintended behavior of an add-on
and removed
enhancement
An enhancement or new feature for an existing add-on
labels
Jan 27, 2025
Signed-off-by: Andrew Fiddian-Green <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
awaiting other PR
Depends on another PR
bug
An unexpected problem or unintended behavior of an add-on
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Resolves #18122
Requires openhab/openhab-core#4561
Depends on #18089
Depends on #18127
Previously the calculations over a StateFilterProfile set of time series state values were based on either a) the Unit of the first member in the set or b) the Unit of the incoming new value. There are two problems: a) the order of the set is not fixed, and b) the Unit of the first member Item resp, the incoming new value, is not definitive to the Unit of the expected result. Therefore these calculations could produce variable and unexpected results.
This PR normalises the calculations so that they are all based on the Unit of the target Item to which the StateFilterProfile is linked.
Furthermore this PR allows conversion between non- inverted and inverted Units so invertible conversions (e.g. Kelvin <=> Mirek) are supported.
This PR may have merge conflicts (and possibly functional conflicts) with #18089 and #18127 so let us wait until those PRs are merged first.
Signed-off-by: Andrew Fiddian-Green [email protected]