* Cache device triggers on startup
* reorg zha init
* don't reuse gateway
* don't nuke yaml configuration
* review comments
* Add unit tests
* Do not cache device and entity registries
* [WIP] Wrap ZHA data in a dataclass
* [WIP] Get unit tests passing
* Use a helper function for getting the gateway object to fix annotations
* Remove `bridge_id`
* Fix typing issues with entity references in group websocket info
* Use `Platform` instead of `str` for entity platform matching
* Use `get_zha_gateway` in a few more places
* Fix flaky unit test
* Use `slots` for ZHA data
Co-authored-by: J. Nick Koston <nick@koston.org>
---------
Co-authored-by: David F. Mulcahey <david.mulcahey@icloud.com>
Co-authored-by: J. Nick Koston <nick@koston.org>
* Create ZHA entities before attempting to connect to the coordinator
* Delete the ZHA gateway object when unloading the config entry
* Only load ZHA groups if the coordinator device info is known offline
* Do not create a coordinator ZHA device until it is ready
* [WIP] begin fixing unit tests
* [WIP] Fix existing unit tests (one failure left)
* Fix remaining unit test
* Expose channel changing over the websocket API
* Expose channel changing as a service
* Type annotate some existing unit test fixtures
* Add unit tests
* Rename `api.change_channel` to `api.async_change_channel`
* Expand on channel migration in the service description
* Remove channel changing service, we only really need the websocket API
* Update homeassistant/components/zha/websocket_api.py
* Black
---------
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
* Rename `zha.api` to `zha.websocket_api`
* Implement a ZHA network settings API
* Use the enum name as the radio type
* Don't filter out ignored config entries
* [WIP] Start unit tests
* Add unit tests
* Rename ZHA websocket API module in `.coveragerc`
* Rename `api` to `websocket_api`
* Increase test coverage to 100%
* Implement WS API endpoints for zigpy backups
* Implement backup restoration
* Display error messages caused by invalid backup JSON
* Indicate to the frontend when a backup is incomplete
* Perform a coordinator backup before HA performs a backup
* Fix `backup.async_post_backup` docstring
* Rename `data` to `backup` in restore command
* Add unit tests for new websocket APIs
* Unit test backup platform
* Move code to overwrite EZSP EUI64 into ZHA
* Include the radio type in the network settings API response
* Make unit tests pass
* Flip response type check to not rely on it being a list
https://github.com/zigpy/zigpy/pull/716#issuecomment-1025236190
* Bump zigpy and quirks versions to ZCLR8 releases
* Fix renamed zigpy cluster attributes
* Handle the default response for ZLL `get_group_identifiers`
* Add more error context to `stage failed` errors
* Fix unit test returning lists as ZCL request responses
* Always load quirks when testing ZHA
* Bump zha-quirks to 0.0.69
* Replace ZHA tests FakeDevice
* Refactor ZHA tests to use zigpy devices and endpoints
* Use common consts for zigpy device mocks
Use the same dict key names for device signature mocks as zha quirks.
* Use const for test device list
* Update tests/components/zha/common.py
* Update zha.permit schema to support install code
* Move install code to core helpers
* QR code converter for enbrighten
* Fix schemas
* Update test for permit service
* Refactor zha.permit to accept install codes
* Test zha.permit from QR code
* Fix regex for Embrighten QR code
* Add regex for Aqara QR codes
* Add Consciot regex for QR code
* Reuse test params for WS tests
* ZHA WS permit command with install code
* Tests for zha.permit WS service
* Refactor zha.permit and zha.remove service to use ATTR_IEEE for the address
* Make pylint happy
* Deprecate only ieee_address param for now
* start implementation
* handle members correctly
* fix group member info
* align groupable devices with group members
* handle group endpoint adding and removing
* update add group
* update group and group member
* update create group
* remove domain check
* update test
* remove temporary 2nd groupable device api
* update test
* rename validator - review comment
* fix test that was never running
* additional testing
* fix coordinator descriptors
* remove check that was done twice
* update test
* Use AsyncMock()
Co-authored-by: Alexei Chetroi <lexoid@gmail.com>
* add skeleton to retrieve zigbee groups
* get single group
* add a group
* return group members with group
* add comment
* fix group members
* add function to add device to group
* add group members
* add remove from group method
* add api to remove members from group
* add remove groups method
* clean up group add and remove
* fix remove group
* fix remove groups
* add api to get only groupable devices
* change var init
* add tests
* address review comment
* get single device web socket command
* test get single device
* add not found error
* fix handling when device doesn't exist
* add test for zha device not found