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 delta state filter handling of negative values #17997

Merged
merged 2 commits into from
Dec 31, 2024

Conversation

jimtng
Copy link
Contributor

@jimtng jimtng commented Dec 29, 2024

  • Fix a bug in delta percent state filter when the input data is negative.
  • In State Filter with a delta / delta percent condition, the first/initial data is not passed through to the item even though it is used as the basis to filter subsequent data. This is not the correct behaviour, and the initial data should be passed through to the item.

This should be backported to 4.3

@jimtng jimtng requested a review from J-N-K as a code owner December 29, 2024 14:44
@jimtng jimtng added the bug An unexpected problem or unintended behavior of an add-on label Dec 29, 2024
@jimtng jimtng marked this pull request as draft December 29, 2024 15:09
@jimtng jimtng force-pushed the statefilter-delta-first branch from 15a62b4 to a025005 Compare December 30, 2024 01:15
@jimtng jimtng changed the title [basicprofiles] Pass the initial data for delta state filter [basicprofiles] Fix delta state filter handling of negative values Dec 30, 2024
@openhab-bot
Copy link
Collaborator

This pull request has been mentioned on openHAB Community. There might be relevant details there:

https://community.openhab.org/t/state-filter-range-filter-profile/158025/36

@jimtng jimtng marked this pull request as ready for review December 30, 2024 13:38
Copy link
Contributor

@lsiepel lsiepel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, LGTM

@lsiepel lsiepel merged commit 34d8fec into openhab:main Dec 31, 2024
3 checks passed
@lsiepel lsiepel added this to the 5.0 milestone Dec 31, 2024
lsiepel pushed a commit that referenced this pull request Dec 31, 2024
…17997)

* [basicprofiles] Pass the initial data for delta state filter

Signed-off-by: Jimmy Tanagra <[email protected]>
@lsiepel lsiepel added the patch A PR that has been cherry-picked to a patch release branch label Dec 31, 2024
@jimtng jimtng deleted the statefilter-delta-first branch January 1, 2025 02:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An unexpected problem or unintended behavior of an add-on patch A PR that has been cherry-picked to a patch release branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants