Add firmware update to Ubiquiti airOS#166913
Open
CoMPaTech wants to merge 2 commits intohome-assistant:devfrom
Open
Add firmware update to Ubiquiti airOS#166913CoMPaTech wants to merge 2 commits intohome-assistant:devfrom
CoMPaTech wants to merge 2 commits intohome-assistant:devfrom
Conversation
8 tasks
Contributor
There was a problem hiding this comment.
Pull request overview
Adds firmware update support to the Ubiquiti airOS integration by introducing an update platform backed by a dedicated firmware-check coordinator, along with updated diagnostics output and expanded test coverage.
Changes:
- Add an
updateentity for airOS firmware, including install handling and new translated error messages. - Introduce a separate firmware
DataUpdateCoordinatorand refactor config entryruntime_datato hold both status + firmware coordinators. - Update diagnostics/tests/fixtures to cover firmware update availability and new runtime data structure.
Reviewed changes
Copilot reviewed 18 out of 18 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
homeassistant/components/airos/__init__.py |
Adds Platform.UPDATE and initializes/stores both status and firmware coordinators in runtime_data. |
homeassistant/components/airos/coordinator.py |
Refactors fetch logic into a shared helper and introduces AirOSFirmwareUpdateCoordinator + AirOSRuntimeData. |
homeassistant/components/airos/update.py |
New update platform/entity implementing firmware update install behavior. |
homeassistant/components/airos/strings.json |
Adds new translated exception messages for firmware update failures. |
homeassistant/components/airos/diagnostics.py |
Splits diagnostics into status_data and firmware_data. |
homeassistant/components/airos/const.py |
Adds UPDATE_SCAN_INTERVAL for firmware check cadence. |
homeassistant/components/airos/sensor.py |
Adjusts to new runtime_data.status structure. |
homeassistant/components/airos/binary_sensor.py |
Adjusts to new runtime_data.status structure. |
homeassistant/components/airos/button.py |
Adjusts to new runtime_data.status structure. |
tests/components/airos/conftest.py |
Adds firmware fixtures and wires update_check into the mocked client; renames status fixture. |
tests/components/airos/test_update.py |
New tests covering update entity creation, install flow, and install failures. |
tests/components/airos/test_init.py |
Adds test ensuring auth errors from shared fetch helper raise ConfigEntryAuthFailed. |
tests/components/airos/test_diagnostics.py |
Updates fixtures/types to match new diagnostics structure. |
tests/components/airos/test_config_flow.py |
Renames fixtures to ap_status_fixture to match new conftest. |
tests/components/airos/test_binary_sensor.py |
Renames fixture parameter to ap_status_fixture. |
tests/components/airos/snapshots/test_diagnostics.ambr |
Updates snapshot to reflect nested status_data/firmware_data. |
tests/components/airos/fixtures/firmware_update_latest.json |
Adds “no update” firmware response fixture. |
tests/components/airos/fixtures/firmware_update_available.json |
Adds “update available” firmware response fixture. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Proposed change
Adding firmware update for supported devices
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: