* Don't update entities until they are initialized
* fix hass reference
* only establish polling once
* fix log level and small cleanup
* start device availability checks after full initialization of network
* add logging
* clean up sensor polling and class hierarchy
* don't attempt restore sensor cleanup in this PR
* put check back
* fix race condition and remove parallel updates
* add sensor polling test
* cleanup switch polling and add a test
* clean up and actually fix race condition
* update light forced refresh
* only use flag
* unused flag
* reduce diff size
* collapse
* zha: Add translation to binary sensors
* Add some small test for name
* Add translations for sensors
* Correct some tests
* Adjust summation key
* Add translation keys for button
* Add translation keys to climate
* Add translation keys for cover
* Add translation keys to fan
* Add translations to light
* Add translations for lock
* Add translation keys to number
* Add translationk keys to select
* Add translations for switch entities
* Add translation to alarm control panel
* Map to some more standard device classes
* Use shorter references
* Remove explicit name from identify button
* Correct tests
* Correction after rebase
* 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
* 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
* 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
* Add tier summation delivered for zlinky
* Improve name case
* Add other tiers and register tier
* Fix smartenergy sensor update
* Account for new reporting configuration in unit tests
* Use cluster ID attributes instead of hardcoding the values
* Use tier names instead of the numeric constants for formatter
* Revert active register tier delivered
* Fix tests
Co-authored-by: puddly <32534428+puddly@users.noreply.github.com>
* Add files via upload
* Add Frequency and PF
* Add Frequency and PF
Add Frequency and PF
* Add Frequency and PF
Add Frequency and PF
* Add Frequency and PF
Add Frequency and PF
* Add Frequency and PF
Add Frequency and PF
* Update homeassistant/const.py
Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
* Update homeassistant/components/zha/sensor.py
Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
* Update homeassistant/const.py
Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
* Fix rebase
* rebase cleanup
* fix stale doc string
* missed this again
* isort
* update tests
* update discovery test data
Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
Co-authored-by: David Mulcahey <david.mulcahey@me.com>
* 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
* expose device temperature sensor in frontend
* fixes after runnig test
* specified device temp channel
* add dev temp int test device aqara water
* black fix
* Add apparent_power for ZHA ElectricalMeasurement
* Add apparent_power to REPORT_CONFIG
* update device list with apparent_power attribute
* update test decorators for apparent_power
* remove comments
* Add test for apparent_power in test_sensor
* Add electrical measurement type state attribute.
* Add active_power_max attribute
* Skip unsupported attributes on entity update
* Fix tests
* Create sensor only if the main attribute is supported
* Refactor ElectricalMeasurement sensor to use attr specific divisor and multiplier
* Multiple entities for electrical measurement cluster
* Update discovery tests
* Sensor clean up
* update tests
* Pylint
* 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
* Refactor ZHA sensors to use cached values after restart
* Get attr from cluster, not channel
* Run cached state through formatter method
* Use cached values for div/multiplier for SmartEnergy channel
* Restore batter voltage from cache
* Refactor sensor to use cached values only
* Update tests
* Add battery sensor test
* Refactor cached ZHA channel reads.
If doing a cached ZCL attribute read, do "only_from_cache" read for
battery operated devices only. Mains operated devices will do a network
read in case of a cache miss.
* Use cached attributes for ZHA electrical measurement
* Bump up ZHA zigpy dependency.