-
-
Notifications
You must be signed in to change notification settings - Fork 34.1k
Allow setup of Zigbee/Thread for ZBT-1 and Yellow without internet access #147549
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
base: dev
Are you sure you want to change the base?
Allow setup of Zigbee/Thread for ZBT-1 and Yellow without internet access #147549
Conversation
Hey there @home-assistant/core, mind taking a look at this pull request as it has been labeled with an integration ( Code owner commandsCode owners of
|
Hey there @home-assistant/core, mind taking a look at this pull request as it has been labeled with an integration ( Code owner commandsCode owners of
|
Hey there @home-assistant/core, mind taking a look at this pull request as it has been labeled with an integration ( Code owner commandsCode owners of
|
homeassistant/components/homeassistant_hardware/firmware_config_flow.py
Outdated
Show resolved
Hide resolved
homeassistant/components/homeassistant_hardware/firmware_config_flow.py
Outdated
Show resolved
Hide resolved
@@ -215,6 +280,14 @@ async def async_step_addon_operation_failed( | |||
}, | |||
) | |||
|
|||
async def async_step_pre_confirm_zigbee( |
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.
This seems odd, how do other integrations do it?
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.
This isn't a pattern I've seen elsewhere but I really have no idea how else to do it, user_input
is passed to the step referenced in return self.async_show_progress_done(next_step_id=next_step_id)
and it skips the final confirmation step otherwise.
I've marked this PR in draft, as changes are requested that need to be processed. Thanks! 👍 ../Frenck |
I've addressed the broad exception review comments. Regarding the |
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 enhances the firmware configuration flow to allow Zigbee/Thread adapters to be set up without internet access when an update is not strictly required, and adds robust handling and tests for download failures.
- Skip firmware update steps if the device already has correct or newer firmware, or if download fails but update isn’t required
- Introduce
pre_confirm_zigbee
/pre_confirm_otbr
intermediary steps and update related config flows and tests - Add new
fw_download_failed
abort reason with user-facing strings and cover it in tests for both required and optional update scenarios
Reviewed Changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
tests/components/homeassistant_yellow/test_config_flow.py | Updated tests to use pre_confirm_ steps and split confirm/create |
tests/components/homeassistant_sky_connect/test_config_flow.py | Mirrored pre-confirm updates and result restructuring in tests |
tests/components/homeassistant_hardware/test_config_flow_failures.py | Added tests for index/image download failures and imported ClientError |
tests/components/homeassistant_hardware/test_config_flow.py | Added scenarios for failed downloads, downgrade guard, and imports |
homeassistant/components/homeassistant_yellow/strings.json | Added fw_download_failed translation key |
homeassistant/components/homeassistant_sky_connect/strings.json | Added fw_download_failed translation key |
homeassistant/components/homeassistant_sky_connect/config_flow.py | Changed Zigbee next step to pre_confirm_zigbee |
homeassistant/components/homeassistant_hardware/strings.json | Added fw_download_failed translation key |
homeassistant/components/homeassistant_hardware/firmware_config_flow.py | Skip or abort on download failures only when strictly required; add pre-confirm steps |
Comments suppressed due to low confidence (1)
homeassistant/components/homeassistant_hardware/firmware_config_flow.py:11
- Remove the duplicate import of
FirmwareUpdateClient
and combine it with the subsequent import ofManifestMissing
to clean up redundant imports.
from ha_silabs_firmware_client import FirmwareUpdateClient, ManifestMissing
Co-authored-by: Norbert Rittel <norbert@rittel.de>
Proposed change
#145019 removed Core's dependency on firmware flashing addons to manage firmware versions. This PR allows for adapter setup to succeed without internet access by avoiding upgrading firmwares where it is not technically necessary (but still recommended):
All other scenarios (migrating between Zigbee and Thread, for example) will still require internet access for addon setup and downloading the correct firmware.
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: