* Initial implementation of hardware update model
* Fixes
* WIP: change the `homeassistant_sky_connect` integration type
* More fixes
* WIP
* Display firmware info in the device page
* Make progress more responsive
* WIP: Yellow
* Abstract the bootloader reset type
* Clean up comments
* Make the Yellow integration non-hardware
* Use the correct radio device for Yellow
* Avoid hardcoding strings
* Use `FIRMWARE_VERSION` within config flows
* Fix up unit tests
* Revert integration type changes
* Rewrite hardware ownership context manager name, for clarity
* Move manifest parsing logic into a new package
Pass the correct type to the firmware API library
* Create and delete entities instead of mutating the entity description
* Move entity replacement into a `async_setup_entry` callback
* Change update entity category from "diagnostic" to "config"
* Have the client library handle firmware fetching
* Switch from dispatcher to `async_on_state_change`
* Remove unnecessary type annotation on base update entity
* Simplify state recomputation
* Remove device registry code, since the devices will not be visible
* Further simplify state computation
* Give the device-less update entity a more descriptive name
* Limit state changes to integer increments when sending firmware update progress
* Re-raise `HomeAssistantError` if there is a problem during flashing
* Remove unnecessary state write during entity creation
* Rename `_maybe_recompute_state` to `_update_attributes`
* Bump the flasher to 0.0.30
* Add some tests
* Ensure the update entity has a sensible name
* Initial ZBT-1 unit tests
* Replace `_update_config_entry_after_install` with a more explicit `_firmware_info_callback` override
* Write the firmware version to the config entry as well
* Test the hardware update platform independently
* Add unit tests to the Yellow and ZBT-1 integrations
* Load firmware info from the config entry when creating the update entity
* Test entity state restoration
* Test the reloading of integrations marked as "owning"
* Test installation failure cases
* Test firmware type change callback failure case
* Address review comments
* Migrate `self._probed_firmware_type` to `self._probed_firmware_info`
* Migrate from `firmware_type` to the full `firmware_info`
* Implement `probe_silabs_firmware_type` via `probe_silabs_firmware_info`
* Fix unit tests
* Increase coverage
* Bring test coverage to 100%
* Simplify test per review comment
* Implement `async_register_firmware_info_provider` for OTBR
* Keep track of the current device for OTBR
Keep track of the current device, part 2
* Fix unit tests
* Revert keeping track of the current device
* Fix existing unit tests
* Increase test coverage
* Remove unused code from tests
* Reload OTBR when the addon reloads
* Only reload if the current entry is running
* Runtime test
* Add a unit test for the reloading
* Clarify the purpose of `ConfigEntryState.SETUP_IN_PROGRESS`
* Simplify typing
* Replace `FirmwareGuess` with `FirmwareInfo` with owner tracking
* Fix up config flow
* Account for OTBR addon existing independent of integration
* Fix remaining unit tests
* Add some tests for ownership
* Unit test `get_zha_firmware_info`
* ZHA `homeassistant_hardware` platform
* OTBR `homeassistant_hardware` platform
* Rework imports
* Fix unit tests
* Add OTBR unit tests
* Add hassfest exemption for `homeassistant_hardware` and `otbr`
* Invert registration to decouple the hardware integration
* Revert "Add hassfest exemption for `homeassistant_hardware` and `otbr`"
This reverts commit c8c6e7044f.
* Fix circular imports
* Fix unit tests
* Address review comments
* Simplify API a little
* Fix `| None` mypy issues
* Remove the `unregister_firmware_info_provider` API
* 100% coverage
* Add `HardwareInfoDispatcher.register_firmware_info_callback`
* Unit test `register_firmware_info_callback` (zha)
* Unit test `register_firmware_info_callback` (otbr)
* Update existing hardware helper tests to use the new function
* Add `async_` prefix to helper function names
* Move OTBR implementation to a separate PR
* Update ZHA diagnostics snapshot
* Switch from `dict.setdefault` to `defaultdict`
* Add some error handling to `iter_firmware_info` and increase test coverage
* Oops
* Move set addon options to aiohasupervisor
* addon stats to aiohasupervisor and test fixes
* addon changelogs to aiohasupervisor
* Raise correct error for library in tests
* Cache client in instance property
* Use singleton method rather then HassIO instance method
* Mock supervisor client in more tests
* Use aiohasupervosor for store addon info
* Use aiohasupervisor install addon
* Use aiohasupervisor for store info API
* Fix onboarding test
* Changes from feedback
* Move get_supervisor_client out of constructor
* Mock supervisor_client in tests
* Make property private
* Fix consider-using-tuple pylint warnings in component tests
* Apply su
Co-authored-by: Michael <35783820+mib1185@users.noreply.github.com>
---------
Co-authored-by: Michael <35783820+mib1185@users.noreply.github.com>
Co-authored-by: Sid <27780930+autinerd@users.noreply.github.com>
Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
Co-authored-by: J. Nick Koston <nick@koston.org>
* Do not connect to the radio hardware within `_connect_zigpy_app`
* Make `connect_zigpy_app` public
* Create radio manager instances from config entries
* Cache device triggers on startup
* reorg zha init
* don't reuse gateway
* don't nuke yaml configuration
* review comments
* Fix existing unit tests
* Ensure `app.shutdown` is called, not just `app.disconnect`
* Revert creating group entities and device registry entries early
* Add unit tests
---------
Co-authored-by: David F. Mulcahey <david.mulcahey@icloud.com>
* Initial implementation of migration back to Zigbee firmware
* Fix typo in `BACKUP_RETRIES` constant name
* Name potentially long-running tasks
* Add an explicit timeout to `_async_wait_until_addon_state`
* Guard against the addon not being installed when uninstalling
* Do not launch the progress flow unless the addon is being installed
* Use a separate translation key for confirmation before disabling multi-PAN
* Disable the bellows UART thread within the ZHA config flow radio manager
* Enhance config flow progress keys for flasher addon installation
* Allow `zha.async_unload_entry` to succeed when ZHA is not loaded
* Do not endlessly spawn task when uninstalling addon synchronously
* Include `uninstall_addon.data.*` in SkyConnect and Yellow translations
* Make `homeassistant_hardware` unit tests pass
* Fix SkyConnect unit test USB mock
* Fix unit tests in related integrations
* Use a separate constant for connection retrying
* Unit test ZHA migration from multi-PAN
* Test ZHA multi-PAN migration helper changes
* Fix flaky SkyConnect unit test being affected by system USB devices
* Unit test the synchronous addon uninstall helper
* Test failure when flasher addon is already running
* Test failure where flasher addon fails to install
* Test ZHA migration failures
* Rename `get_addon_manager` to `get_multiprotocol_addon_manager`
* Remove stray "addon uninstall" comment
* Use better variable names for the two addon managers
* Remove extraneous `self.install_task = None`
* Use the addon manager's `addon_name` instead of constants
* Migrate synchronous addon operations into a new class
* Remove wrapper functions with `finally` clause
* Use a more descriptive error message when the flasher addon is stalled
* Fix existing unit tests
* Remove `wait_until_done`
* Fully replace all addon name constants with those from managers
* Fix OTBR breakage
* Simplify `is_hassio` mocking
* Add missing tests for `check_multi_pan_addon`
* Add missing tests for `multi_pan_addon_using_device`
* Use `waiting` instead of `sync` in class name and methods
* Warn when changing multipan channel if there are not 2 known users
* Add test
* Improve messages
* Tweak translation string
* Adjust message
* Remove unused translation placeholders
* Add silabs_multiprotocol platform
* Add new files
* Add ZHA tests
* Prevent ZHA from creating database during tests
* Add delay parameter to async_change_channel
* Add the updated dataset to the dataset store
* Allow MultipanProtocol.async_change_channel to return a task
* Notify user about the duration of migration
* Update tests
* Migrate ZHA when enabling multi-PAN support on HA Yellow
* Refactor BaseZhaFlow.async_step_maybe_confirm_ezsp_restore
* Change data passed to ZHA to initiate migration
* Catch errors during ZHA migration
* Fix ZhaMigrationHelper.async_prepare_yellow_migration return value
* Improve test coverage
* Improve test coverage
* Fix spelling
* Rename some none HA yellow specifics
* Rename again
* Increase number of migration retries + refactor
* Suppress OperationNotAllowed when reloading
* Adjust tests