-
-
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
[zoneminder] Fix calls to set state options #11463
Conversation
Signed-off-by: Mark Hilbush <[email protected]>
This pull request has been mentioned on openHAB Community. There might be relevant details there: https://community.openhab.org/t/new-zoneminder-binding-for-zoneminder-versions-1-34-0/95112/362 |
My immediate thinking is that'll it should rather be done / checked by the core framework. |
Definitely yes. And IIRC it is already implemented in |
Do you think the ordering of the list elements might be the culprit? |
No. 😉 Look at my original code. I had the call to |
I'll update the PR to move those calls to after the for loop. That should resolve the issue. Agree? |
I do. |
Signed-off-by: Mark Hilbush <[email protected]>
Ok, I believe this is the correct fix. Thanks for helping me find my error. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks.
@lolodomo Fine for you?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
I realized the PR title is wrong. Can you fix it? |
Good catch. fixed. |
) * Only update state options if they've changed Signed-off-by: Mark Hilbush <[email protected]> * Fix update of state options Signed-off-by: Mark Hilbush <[email protected]> Signed-off-by: Dave J Schoepel <[email protected]>
) * Only update state options if they've changed Signed-off-by: Mark Hilbush <[email protected]> * Fix update of state options Signed-off-by: Mark Hilbush <[email protected]>
) * Only update state options if they've changed Signed-off-by: Mark Hilbush <[email protected]> * Fix update of state options Signed-off-by: Mark Hilbush <[email protected]> Signed-off-by: Nick Waterton <[email protected]>
) * Only update state options if they've changed Signed-off-by: Mark Hilbush <[email protected]> * Fix update of state options Signed-off-by: Mark Hilbush <[email protected]>
) * Only update state options if they've changed Signed-off-by: Mark Hilbush <[email protected]> * Fix update of state options Signed-off-by: Mark Hilbush <[email protected]>
) * Only update state options if they've changed Signed-off-by: Mark Hilbush <[email protected]> * Fix update of state options Signed-off-by: Mark Hilbush <[email protected]>
There are situations when the binding updates the state options even if the options haven't changed. This results in an unnecessary reload of the page in Basic UI. With this change, the state options are updated only if they change.
Signed-off-by: Mark Hilbush [email protected]