-
-
Notifications
You must be signed in to change notification settings - Fork 35.8k
Z-Wave: ESPHome discovery to update all options #154113
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
The PR updates Z-Wave JS ESPHome discovery handling to properly update config entries and add-on configurations without relying on config entry reloads. Instead of depending on reloading to sync add-on options to the config entry data, it now directly updates the config entry data and ensures the add-on is stopped before making configuration changes.
- Adds direct config entry data updates when handling ESPHome discovery for existing entries
- Stops running add-on before updating configuration to ensure clean state transitions
- Updates test to verify the new behavior with proper mocking
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| homeassistant/components/zwave_js/config_flow.py | Adds add-on state checking, stopping logic, and direct config entry updates for ESPHome discovery |
| tests/components/zwave_js/test_config_flow.py | Updates test fixture and adds assertions to verify new add-on stopping and config entry update behavior |
Breaking change
Proposed change
When Z-Wave JS handles an ESPHome discovery, now make sure we update the config entry and add-on config. No longer rely on reloading the config entry to set it up, because the add-on might not be in a known state.
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: