* Remove duplicated attribute request from ZHA
The on_off attribute is on the REPORT_CONFIG, so
super().async_initialize already requests it from the device.
No need to request it twice.
* Use skip_configuration flag to skip requests in ZHA
* Fix loading from cache
* Fix loading from cache condition
* 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
* Update ZHA dependencies
* Update zigpy-zigate
* Move ZNP on top of the radios so it's probed 1st
Some stick don't like if there was some unexpected traffic on the port
prior the initialization.
* Update dependencies
* Remove unnecessary exception re-wraps
* Preserve exception chains on re-raise
We slap "from cause" to almost all possible cases here. In some cases it
could conceivably be better to do "from None" if we really want to hide
the cause. However those should be in the minority, and "from cause"
should be an improvement over the corresponding raise without a "from"
in all cases anyway.
The only case where we raise from None here is in plex, where the
exception for an original invalid SSL cert is not the root cause for
failure to validate a newly fetched one.
Follow local convention on exception variable names if there is a
consistent one, otherwise `err` to match with majority of codebase.
* Fix mistaken re-wrap in homematicip_cloud/hap.py
Missed the difference between HmipConnectionError and
HmipcConnectionError.
* Do not hide original error on plex new cert validation error
Original is not the cause for the new one, but showing old in the
traceback is useful nevertheless.
* 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.
Since zigpy change to support bitmap classes, formatting string was incorrectly generated for the newly joined devices with SmartEnergy metering clusters.
* Update ZHA config flow Zigbee radio description
Update ZHA config flow Zigbee radio descriptions to match docs https://github.com/home-assistant/home-assistant.io/pull/13437
* Make protocol plus model names more readable for end-users
* Update homeassistant/components/zha/core/const.py
Co-authored-by: Alexei Chetroi <lexoid@gmail.com>
* Update homeassistant/components/zha/core/const.py
Co-authored-by: Alexei Chetroi <lexoid@gmail.com>
* Update homeassistant/components/zha/core/const.py
Co-authored-by: Alexei Chetroi <lexoid@gmail.com>
* Zigbee radio description simplified and examples listed in alphabetical order
* Centralite specific control seq of operation
* Remove Fan safeguards
* Split hvac_action property.
* Refactor hvac_action property.
Current hvac_action logic is Zen Within thermostat specific and differs
a bit from ZCL specs. Implement it as a separate class.
* Refactor hvac_action property for default thermostat
Follow more closely ZCL specs in parsing hvac state of the thermostat.
* Initial ZHA climate implementation.
* Add retryable_request decorator.
sort helpers imports.
* Check manufacturer for Climate implementation.
* Default zha.climate.operation_list to [Off]
* Migrate to climate 1.0
* Sort imports, properties and methods.
* Handle 'PRESET_NONE' presets.
* Use pi_heating/cooling_demand for HVAC action prop.
* Implement `running_state` HVAC channel property.
For ZHA thermostats which don't support `pi_heating_demand` or
`pi_cooling_demand' attributes.
* wip fan support
* Refactor retryable request logging.
* Rebase cleanup.
* Update climate discovery.
* Fix ZHA climate restoration.
* Bulk configure attribute reports.
* Use configure_reporting_multiple command for Light
More detailed response parsing of configure_reporting_multiple.
* Use ordered list for HVAC cluster attribute reports.
* Don't mutilate HVAC mode list.
* Add fan_mode property to fan channel.
* Fix type hinting.
* Expose fan mode only.
* Implement fan mode setting.
Drop support for HVAC_FAN_ONLY mode.
* Use ClimateEntity as base class.
* Cleanup debug code.
* Update time display for Sinope.
* Don't do many retries.
* Don't use multi attr reporting configuration.
* Make tests pass.
* Drop support for setpoint change source/amount.
* Cleanups.
* Drop aux heat
* Update tests.
* Drop Sinope temperature display code.
* Update tests.
* Refactor temperature setting.
* Update tests.
* Update Fan tests.
* Lint
* Black.
* Use correct logging levels
* Refactor ZHA config flow
Present more descriptive list of radio types when user has to pick one.
* Update docstring.
* Add some common models to EZSP radio.
* Add more model names
More model names, less english since radio types won't be translated.
* Start gateway using new zigpy init.
Update config entry data import.
Use new zigpy startup.
Fix config entry import without zha config section.
Auto form Zigbee network.
* Migrate config entry.
* New ZHA config entry flow.
Use lightweight probe() method for ZHA config entry validation when
available. Failback to old behavior of setting up Zigpy app if radio lib
does not provide probing.
* Clean ZHA_GW_RADIO
* Don't import ZHA device settings.
* Update config flow tests.
* Filter out empty manufacturer.
* Replace port path with an by-id device name.
* Rebase cleanup
* Use correct mock.
* Make lint happy again
* Update tests/components/zha/test_config_flow.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Update tests/components/zha/test_config_flow.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Update tests/components/zha/test_config_flow.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* Use executor pool for IO
* Address comments.
Use AsyncMock from tests.
* Use core interface to test config flow.
* Use core interface to test config_flow.
* Address comments. Use core interface.
* Update ZHA dependencies.
* Schema guard
* Use async_update_entry for migration.
* Don't allow schema extra keys.
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* 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>
* Rename BinarySensorDevice to BinarySensorEntity
* Tweak
* Move deprecation warning to __new__, add test
* Move deprecation warning back to __init__
* Move deprecation warning to __init_subclass
* Add prettier (in pre-commit and CI)
* Make all file prettier
* Change order
* Add to Azure Pipelines
* Fix a YAML file prettier caught as invalid
* Remove flow mapping using curly braces from all YAML service files
* start of fan groups
* update fan classes
* update group entity domains
* add set speed
* update discovery for multiple entities for groups
* add fan group entity tests
* cleanup const
* cleanup entity_domain usage
* remove bad super call
* remove bad update line
* fix set speed on fan group
* change comparison
* pythonic list
* discovery guards
* Update homeassistant/components/zha/core/discovery.py
Co-Authored-By: Alexei Chetroi <lexoid@gmail.com>
Co-authored-by: Alexei Chetroi <lexoid@gmail.com>
* split entity into base and entity
* add initial light group support
* add dispatching of groups to light
* added zha group object
* add group event listener
* add and remove group members
* get group by name
* fix rebase
* fix rebase
* use group_id for unique_id
* get entities from registry
* use group name
* update entity domain
* update zha storage to handle groups
* dispatch group entities
* update light group
* fix group remove and dispatch light group entities
* allow picking the domain for group entities
* beginning - auto determine entity domain
* move methods to helpers so they can be shared
* fix rebase
* remove double init groups... again
* cleanup startup
* use asyncio create task
* group entity discovery
* add logging and fix group name
* add logging and update group after probe if needed
* test add group via gateway
* add method to get group entity ids
* update storage
* test get group by name
* update storage on remove
* test group with single member
* add light group tests
* test some light group logic
* type hints
* fix tests and cleanup
* revert init changes except for create task
* remove group entity domain changing for now
* add missing import
* tricky code saving
* review comments
* clean up class defs
* cleanup
* fix rebase because I cant read
* make pylint happy
* Update firmware version in device registry.
Parse recevied OTA requests for firmware version and update device
registry.
* Update tests.
* Cleanup sw_id_update listener.
* Update ZHA test devices list.
* Split ZHA device loading and entities adding.
Load zha devices from ZHA gateway, but add entities after integration
was setup.
* Use hass.loop.create_task()
* Split ZHA device initialization from loading.
Restore and initialize ZHA devices separately.
* Use hass.async_create_task()
Load devices prior group initialization.
* cleanup timer handle when device is removed
* separate unavailable times for mains vs battery
* better name
* remove light refresh handle when removing light
* remove unused parallel updates
* don't steal HA const for different purpose
* don't flood network every hour for lights
* update test to test both intervals
* add test for light refresh interval
* fix tests
* update test
* put parallel updates back for now...
* fix async_schedule_update_ha_state usage
* review comment
* review comment
* update test - review conversation
* review comments
* await count not call count
* flip some state
* Refactor zha core device _check_available().
Make it async, so we don't run it in a sync worker.
* Use random keep alive interval for zha device pings.
* Update tests.
* multi attribute reads for lights
* catch specific exceptions
* get attributes
* fix mains powered update
* add guards and use get_attributes
* use debug for read failures
* cleanup
* update return value for read_attributes
* fix on with timed off
* Add and use time related constants
* Sort time constants and reuse them in data rate constants
* Fix greeneyemonitor import
* Fix greeneyemonitor import V2
* Fix failing here_travel_time test
* Add TIME_MONTHS and TIME_YEARS
* Use TIME_MINUTES in opentherm_gw and isy994
* Add and use TIME_MILLISECONDS
* Change inconsistent ones
* Add TIME_MICROSECONDS and TIME_WEEKS
* Use constants in apcupsd and travisci
* Fix import error in upnp sensor.py
* Fix isy994 sensor.py using TIME_YEARS
* Fix dyson tests
* Use TIME_SECONDS in more places
* Use TIME_DAYS in google wifi
* Add ZHA core typing helper.
* Add aux_channels to ZHA rule matching.
* Add match rule claim_channels() method.
* Expose underlying zigpy device.
* Not sure we need this one.
* Move "base" channels.
* Framework for channel discovery.
* Make DEVICE_CLASS and REMOTE_DEVICE_TYPE default dicts.
* Remove attribute reporting configuration registry.
* Refactor channels.
- Refactor zha events
- Use compound IDs and unique_ids
- Refactor signal dispatching on attribute updates
* Use unique id compatible with entities unique ids.
* Refactor ZHA Entity registry.
Let match rule to check for the match.
* Refactor discovery to use new channels.
* Cleanup ZDO channel.
Remove unused zha store call.
* Handle channel configuration and initialization.
* Refactor ZHA Device to use new channels.
* Refactor ZHA Gateway to use new discovery framework.
Use hass.data for entity info intermediate store.
* Don't keep entities in hass.data.
* ZHA gateway new discovery framework.
* Refactor ZHA platform loading.
* Don't update ZHA entities, when restoring from zigpy.
* ZHA entity discover tests.
* Add AnalogInput sensor.
* Remove 0xFC02 based entity from Keen smart vents.
* Clean up IAS channels.
* Refactor entity restoration.
* Fix lumi.router entities name.
* Rename EndpointsChannel to ChannelPool.
* Make Channels.pools a list.
* Fix cover test.
* Fix FakeDevice class.
* Fix device actions.
* Fix channels typing.
* Revert update_before_add=False
* Refactor channel class matching.
* Use a helper function for adding entities.
* Make Pylint happy.
* Rebase cleanup.
* Update coverage for ZHA device type overrides.
* Use cluster_id for single output cluster registry.
* Remove ZHA typing from coverage.
* Fix tests.
* Address comments.
* Address comments.