Commit Graph

27 Commits (b07e9df308a2fec26d76ee0ae046c5699d0546d1)

Author SHA1 Message Date
Erik Montnemery f1d3c417f9
Remove homeassistant_yellow config entry if hassio is not present (#109686) 2024-02-05 12:29:25 +01:00
Erik Montnemery 3895defff9
Improve calls to async_show_progress in homeassistant_hardware (#107789) 2024-01-14 10:41:44 +01:00
puddly bd8f01bd35
Bump ZHA dependencies (#104335) 2023-11-29 11:30:15 +01:00
c0ffeeca7 b3b5ca9b95
Terminology: Rename Multi-PAN to Multiprotocol to be consistent (#99262) 2023-10-01 16:20:09 +02:00
puddly a6f325d05a
Cache device trigger info during ZHA startup (#99764)
* 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>
2023-09-11 14:36:01 +02:00
Erik Montnemery 80caeafcb5
Add documentation URL for homeassistant_yellow (#99336)
* Add documentation URL for homeassistant_yellow

* Fix test

* Tweak
2023-08-31 10:50:53 -04:00
Erik Montnemery 03b1c7ad1d
Minor improvement in tests of hardware integrations (#99361) 2023-08-30 21:11:52 +02:00
puddly c8ef3f9393
Automatic migration from multi-PAN back to Zigbee firmware (#93831)
* 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
2023-08-28 17:26:34 -04:00
Erik Montnemery 15e5cf01bb
Add `silabs_multiprotocol` platform (#92904)
* 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
2023-06-01 12:32:14 +02:00
Erik Montnemery ce99319ea5
Add LED settings support to Home Assistant Yellow (#86451)
* Add LED control support to Home Assistant Yellow

* Fix the handlers

* Remove switch platform

* Allow configuring LED settings from the options flow

* Add missing translations

* Add tests

* Add tests
2023-04-26 11:02:52 -04:00
Franck Nijhof ed79265843
Enable Ruff PT006 (#88165)
* Enable Ruff PT006

* Adjust existing cases

* Fix tests

* Remove unneeded parentheses
2023-02-15 14:09:50 +01:00
epenet 03710e58b5
Add type hints to integration tests (part 9) (#87983) 2023-02-13 12:06:51 +01:00
puddly 4b88a71d60
Re-enable multi-PAN (#86533)
Revert "Disable multi-pan (#83603)"

This reverts commit 9c7b80090a.
2023-01-24 19:05:17 +01:00
Martin Hjelmare 94b80db968
Handle not available add-on in hassio add-on manager (#84943)
* Handle not available add-on in hassio add-on manager

* Fix zwave_js tests

* Fix sky connect tests

* Fix matter tests

* Fix yellow tests

* Update hardware tests
2023-01-02 20:28:21 -05:00
Paulus Schoutsen ea8511bcfc
Disable multi-pan (#83603)
* Disable multi-pan

* One more test skip
2022-12-08 22:43:52 -05:00
Erik Montnemery b7652c78ee
Add options flow to enable multiprotocol support on sky connect (#82525) 2022-11-29 16:34:55 -05:00
Erik Montnemery 892be99ca0
Check if Multi-PAN addon is using the HA Yellow's radio (#82853) 2022-11-28 13:55:07 -05:00
Erik Montnemery be7e76f302
Migrate ZHA when enabling multi-PAN support on HA Yellow (#82213)
* 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
2022-11-22 11:17:23 +01:00
Erik Montnemery a6ff8c5fb3
Fix Home Assistant Yellow tests (#82212) 2022-11-16 13:01:53 -06:00
Erik Montnemery aaec464627
Add support for managing the silabs multiprotocol add-on (#82170)
* Add support for managing the silabs multiprotocol add-on

* Fix passing context when starting option flow

* Allow unloading a ha yellow config entry

* Fix tests

* Log data passed to ZHA option flow

* Improve ZHA migration logic

* Move tests

* Improve test coverage

* Remove dead code

* Drop automatic ZHA migration
2022-11-16 17:38:07 +01:00
Erik Montnemery 874ece195e
Include config entry id in response to WS API hardware/info (#81906) 2022-11-10 13:19:21 +01:00
puddly 4b24370549
ZHA Yellow config flow fixes (#77603) 2022-08-31 11:21:37 -04:00
Erik Montnemery 067d21a307
Refactor hardware.async_info to return list[HardwareInfo] (#77183) 2022-08-29 08:45:39 +02:00
Erik Montnemery bb74730e96
Add support for USB dongles to the hardware integration (#76795)
* Add support for USB dongles to the hardware integration

* Update hardware integrations

* Adjust tests

* Add USB discovery for SkyConnect 1.0

* Improve test coverage

* Apply suggestions from code review

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>

* Fix frozen dataclass shizzle

* Adjust test

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2022-08-18 21:52:12 +02:00
Franck Nijhof a6244eea28
Search/replace RESULT_TYPE_* by FlowResultType enum (#74656) 2022-07-07 21:28:18 +02:00
Erik Montnemery 274f585646
Tweak title of zha config entry created by yellow hw (#73797) 2022-06-21 16:21:31 -04:00
Erik Montnemery e3b6c7a66f
Add Home Assistant Yellow integration (#73272)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2022-06-13 23:25:11 -07:00