-
-
Notifications
You must be signed in to change notification settings - Fork 223
fix: always update normal powerlevel when switching regions #4378
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
Conversation
Co-authored-by: AlCalzone <17641229+AlCalzone@users.noreply.github.com>
Co-authored-by: AlCalzone <17641229+AlCalzone@users.noreply.github.com>
💡 The pull request title does not match our guidelines 💡 We follow conventional commits, check out the description and examples. This means that the PR title must...
The description should use uppercase and lowercase normally, except for the first character which must be lowercase. |
1 similar comment
💡 The pull request title does not match our guidelines 💡 We follow conventional commits, check out the description and examples. This means that the PR title must...
The description should use uppercase and lowercase normally, except for the first character which must be lowercase. |
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.
The change seems wrong
@AlCalzone apart from the ci test added the change on code seems legit, why you said it's wrong? |
Pull Request Test Coverage Report for Build 17975807971Details
💛 - Coveralls |
Because it's supposed to refresh the powerlevel when it's configured automatically. This change just makes it refresh it always, but I already had it set to auto powerlevels. |
So the previous implementation was correct the question so is why it's not updated ? Could it be a race condition? Maybe when it reads it it's still not updated |
The normal powerlevel field was not being updated automatically when switching RF regions in the Controller node panel. Users had to manually click the refresh button to see the updated powerlevel value after changing regions, while the LR max power field was updating correctly.
Root Cause
The
setRFRegion()
method inZwaveClient.ts
only refreshed the normal powerlevel when it was configured in 'auto' mode:However, the normal powerlevel should always be refreshed when the region changes because:
Solution
Modified the
setRFRegion()
method to always include'powerlevel'
in the properties to update when the region changes:This ensures that both normal and LR powerlevels are properly updated when switching regions, matching the expected behavior described in the issue.
Testing
Added comprehensive tests to verify:
Fixes #4377.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.