-
-
Notifications
You must be signed in to change notification settings - Fork 35.8k
Fix Z-Wave handling of driver ready event #149879
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
|
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.
Pull Request Overview
This PR fixes Z-Wave handling of driver ready events by ensuring config entries are reloaded when receiving a driver ready event from external sources (like Z-Wave JS UI). Previously, the integration only listened for driver ready events during specific operations like controller hard reset or NVM restore within Home Assistant.
- Adds a global listener for driver ready events to reload config entries and clean stored client state
- Consolidates driver ready event handling logic into a reusable helper function
- Updates test expectations to reflect the new approach where config entry reloads happen automatically
Reviewed Changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
homeassistant/components/zwave_js/__init__.py |
Adds global driver ready event listener to automatically reload config entries |
homeassistant/components/zwave_js/helpers.py |
Adds new helper function for waiting on driver ready events and config entry reloads |
homeassistant/components/zwave_js/const.py |
Moves DRIVER_READY_TIMEOUT constant to helpers.py as DRIVER_READY_EVENT_TIMEOUT |
homeassistant/components/zwave_js/config_flow.py |
Updates to use new helper function for driver ready event handling |
homeassistant/components/zwave_js/api.py |
Updates hard reset and NVM restore operations to use new helper function |
tests/components/zwave_js/test_init.py |
Adds test for driver ready event handling |
tests/components/zwave_js/test_config_flow.py |
Updates tests to use new constant location and adjusted call counts |
tests/components/zwave_js/test_api.py |
Refactors tests to use proper async mocks and updated constant references |
Breaking change
Proposed change
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: