Skip to content

Add firmware update to Ubiquiti airOS#166913

Open
CoMPaTech wants to merge 2 commits intohome-assistant:devfrom
CoMPaTech:airos_updates
Open

Add firmware update to Ubiquiti airOS#166913
CoMPaTech wants to merge 2 commits intohome-assistant:devfrom
CoMPaTech:airos_updates

Conversation

@CoMPaTech
Copy link
Copy Markdown
Member

@CoMPaTech CoMPaTech commented Mar 30, 2026

Proposed change

Adding firmware update for supported devices

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New integration (thank you!)
  • New feature (which adds functionality to an existing integration)
  • Deprecation (breaking change to happen in the future)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Additional information

Checklist

  • I understand the code I am submitting and can explain how it works.
  • The code change is tested and works locally.
  • Local tests pass. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • I have followed the development checklist
  • I have followed the perfect PR recommendations
  • The code has been formatted using Ruff (ruff format homeassistant tests)
  • Tests have been added to verify that the new code works.
  • Any generated code has been carefully reviewed for correctness and compliance with project standards.

If user exposed functionality or configuration variables are added/changed:

If the code communicates with devices, web services, or third-party tools:

  • The manifest file has all fields filled out correctly.
    Updated and included derived files by running: python3 -m script.hassfest.
  • New or updated dependencies have been added to requirements_all.txt.
    Updated by running python3 -m script.gen_requirements_all.
  • For the updated dependencies a diff between library versions and ideally a link to the changelog/release notes is added to the PR description.

To help with the load of incoming pull requests:

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 update entity for airOS firmware, including install handling and new translated error messages.
  • Introduce a separate firmware DataUpdateCoordinator and refactor config entry runtime_data to 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants