-
-
Couldn't load subscription status.
- Fork 35.7k
Use hardware bootloader reset methods for firmware config flows #153277
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
Use hardware bootloader reset methods for firmware config flows #153277
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
|
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 enables hardware bootloader reset methods for firmware config flows by upgrading universal-silabs-flasher to version 0.0.33 and implementing device-specific reset methods. The change allows firmware flashing to succeed even when the current firmware on the adapter cannot be detected.
Key changes:
- Upgrades universal-silabs-flasher dependency from 0.0.32 to 0.0.33
- Changes bootloader reset parameter from single string to sequence of strings
- Adds specific reset methods for Yellow ("yellow") and ZBT-2 ("rts_dtr", "baudrate") devices
Reviewed Changes
Copilot reviewed 16 out of 16 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| requirements_all.txt | Updates universal-silabs-flasher dependency to 0.0.33 |
| requirements_test_all.txt | Updates test dependency to match production requirement |
| homeassistant/components/homeassistant_hardware/manifest.json | Updates manifest with new universal-silabs-flasher version |
| homeassistant/components/homeassistant_hardware/util.py | Changes bootloader_reset parameter from string to sequence |
| homeassistant/components/homeassistant_hardware/update.py | Updates bootloader_reset_type to bootloader_reset_methods list |
| homeassistant/components/homeassistant_hardware/firmware_config_flow.py | Adds BOOTLOADER_RESET_METHODS class attribute and uses it in firmware installation |
| homeassistant/components/homeassistant_yellow/update.py | Updates Yellow firmware entity to use list-based reset methods |
| homeassistant/components/homeassistant_yellow/config_flow.py | Adds Yellow-specific bootloader reset methods constant |
| homeassistant/components/homeassistant_sky_connect/update.py | Updates SkyConnect to use empty list instead of None for reset methods |
| homeassistant/components/homeassistant_connect_zbt2/update.py | Adds ZBT-2 specific reset methods (rts_dtr, baudrate) |
| homeassistant/components/homeassistant_connect_zbt2/config_flow.py | Adds ZBT-2 bootloader reset methods with explanation comment |
| tests/ | Updates all test files to use new sequence-based bootloader reset API and adds verification tests |
|
There are merge conflicts now. |
| return FlasherApplicationType(self.value) | ||
|
|
||
|
|
||
| class ResetTarget(StrEnum): |
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.
Why don't we use the library ResetTarget enum directly?
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 address this as a follow up if needed.
Proposed change
This PR includes a bump of
universal-silabs-flasherto 0.0.34, which adds a baudrate command mode reset pattern to USF.Currently, we do not use the hardware bootloader reset for adapters that support it. This PR enables it for the Yellow and ZBT-2 firmware flows and adds tests to ensure it is used. This makes firmware flashing succeed even if we cannot detect the firmware currently running on the adapter.
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: