* Make `find_entity_id` synchronous
* Remove `tries`
* Use new `attribute_updated` event signature
* Validate attributes before creating entities
* Avoid swallowing exceptions when opening covers
* Bump ZHA dependencies
* Add a matcher for Sinope water leak sensors using a non-standard ZCL attribute
* Ensure handler matching is strict, not multi
* Add type annotations for newly-updated functions
* 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 restore_state helper to use registry loading pattern
As more entities have started using restore_state over time, it
has become a startup bottleneck as each entity being added is
creating a task to load restore state data that is already loaded
since it is a singleton
We now use the same pattern as the registry helpers
* fix refactoring error -- guess I am tired
* fixes
* fix tests
* fix more
* fix more
* fix zha tests
* fix zha tests
* comments
* fix error
* add missing coverage
* s/DATA_RESTORE_STATE_TASK/DATA_RESTORE_STATE/g
* Ensure devices with bad cluster subclasses do not prevent startup
* Explicitly unit test an affected SML001 device
* Do not use invalid `hue_occupancy` attribute name
* Actually remove `hue_occupancy`
* Bump ZHA dependencies
* 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>
* Always use `Light` for lights, including subclasses
* Clean up other platforms
* Add a unit test to ensure all future entity classes have names
* Remove stale `_name`
* Address review feedback and rename `Open` to `Opening`
* rename channel -> cluster handler
* remove refs to channels and create endpoint class
* remove remaining references to channels
* fix filter
* take in latest changes from #91403
* missed one
* missed a reference
* Restore state for ZHA OnOff binary sensors
* Let `Motion` extend `Opening`
`Motion` is just a specified version of `Opening` that only changes the device class for some motion sensors.
Since we have more "special code" in the OnOff/Opening sensor now, we also want to make sure that gets applied to `Motion` binary sensors.
* Improve comment and type
* Add test to verify that binary sensors restore last HA state
* Migrate old ZHA IasZone sensor state to zigpy cache
* Use correct type for ZoneStatus
* Test that migration happens
* Test that migration only happens once
* Fix parametrize
* Construct binary sensor state from zigpy cache (WIP)
* Workaround zha-quirks issue where "MotionWithReset" quirks don't update attribute cache (WIP)
zha-quirks currently has an issue where the ZONE_STATE attribute is updated (when the zone_STATUS changes).
https://github.com/zigpy/zha-device-handlers/pull/2231 is a proper fix for this.
For now, we just update the attribute cache when we get the "zone status update notification" command.
This wasn't noticed before, as the "attribute report signal" was sent from the `cluster_command()` method and the used the provided attribute (in the signal) to update the `_state` value in the binary sensor class.
As we just tell HA to write state again when we get an attribute report now, the ZONE_STATUS attribute is read now (and needs to be correct).
* Use parse() method of main class for IasZone entity (with stripped bits)
* Change wording in comment, remove explicitly sending attr signal
(This comment should be removed/changed later anyway)
* Remove note
* Get zone_status attribute id with zigpy
* Remove `security.` prefix for `IasZone` import
`AceCluster` was already directly imported and `IasZone` is too now for getting the attribute id
* Store full zone status attribute in cache
* Check that non-alarm bits are ignored in IasZone sensor test
* Re-enable occupancy binary sensor test
This test seems to work fine and I don't see any reason why it was commented out for a while
* Fix cached read mix-up for `zone_status`/`zone_state`
This allows cached reads for `zone_state` (enrolled or not), but forces a new read for `zone_status` (alarm or not).
* Fix `quirk_class_validator`
Fix the `quirk_class_validator` for quirks with more than 1 module level
* fix black
* Shorten `quirk_cls` in `clss`
Co-authored-by: TheJulianJES <TheJulianJES@users.noreply.github.com>
* Update comment
---------
Co-authored-by: TheJulianJES <TheJulianJES@users.noreply.github.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%
* Clean config flow entries with trailing whitespace
* Rewrite the config entry at runtime, without upgrading
* Skip intermediate `data = config_entry.data` variable
* Perform a deepcopy to ensure the config entry will actually be updated
* Expose the Yellow-internal radio and multi-PAN addon as named serial ports
* Remove the serial number if it isn't available
* Use consistent names for the addon and Zigbee radio
* Add `homeassistant_hardware` and `_yellow` as `after_dependencies`
* Handle `hassio` not existing when listing serial ports
* Add unit tests