-
-
Notifications
You must be signed in to change notification settings - Fork 31.7k
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
Resume adding Z-Wave device if the page is refreshed #129081
Resume adding Z-Wave device if the page is refreshed #129081
Conversation
Hey there @home-assistant/z-wave, mind taking a look at this pull request as it has been labeled with an integration ( Code owner commandsCode owners of
|
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.
Please add tests for the changed code.
Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍 |
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.
Thanks!
…129081) * ZwaveJS: Resume adding a device if the page is refreshed * add test * address PR comments
…129081) * ZwaveJS: Resume adding a device if the page is refreshed * add test * address PR comments
Proposed change
If device inclusion is already in progress when the "zwave_js/add_node" is received, we subscribe to the controller events but if the "node added" has passed, we will not be subscribed to the node events. So the client will not know when the device inclusion ended.
This PR checks if inclusion is in progress and if there is already a node that hasn't finished the process. It then subscribes to the node events and sends "node added" event to the frontend so proper progress can be displayed.
The use case for this is refreshing the Configure page or reopening it after a crash, for example.
A frontend PR will follow to better utilize these changes but is not required for this to work. FE PR home-assistant/frontend#22519
Type of change
Additional information
Checklist
ruff format homeassistant tests
)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest
.requirements_all.txt
.Updated by running
python3 -m script.gen_requirements_all
.To help with the load of incoming pull requests: