Commit Graph

686 Commits (701c4ee624bfc593cd41df9efabb84291ad32415)

Author SHA1 Message Date
Abílio Costa 28fb761b01
Use skip_configuration flag to skip requests in ZHA (#41554)
* 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
2020-10-16 20:03:35 -04:00
Alexei Chetroi c29f613b1d
Fix schema for set_zigbee_cluster_attribute service (#41850) 2020-10-16 20:02:14 -04:00
HomeAssistant Azure 994ae09f69 [ci skip] Translation update 2020-10-15 00:03:50 +00:00
HomeAssistant Azure ba55cb8955 [ci skip] Translation update 2020-10-14 00:04:41 +00:00
HomeAssistant Azure 1417a4161f [ci skip] Translation update 2020-10-13 00:03:24 +00:00
puddly f7e7f1371e
Update zigpy-znp to 0.2.2 (#41670) 2020-10-12 09:44:40 -04:00
HomeAssistant Azure f787289ea0 [ci skip] Translation update 2020-10-12 00:03:31 +00:00
HomeAssistant Azure 80522f1bdc [ci skip] Translation update 2020-10-11 00:03:37 +00:00
J. Nick Koston da2f9db62e
Fix async functions accidentally marked as callbacks (#41607) 2020-10-10 16:54:36 +02:00
HomeAssistant Azure 6ae12c3faf [ci skip] Translation update 2020-10-10 00:05:05 +00:00
Abílio Costa 078ecef4b2
Remove duplicated attribute request from ZHA (#41442)
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.
2020-10-09 09:23:52 -04:00
HomeAssistant Azure 29aea5a66c [ci skip] Translation update 2020-10-09 00:04:33 +00:00
HomeAssistant Azure 486c0b644a [ci skip] Translation update 2020-10-07 00:06:20 +00:00
Alexei Chetroi 0ec4887837
Bump up zha dependency to 0.26.0 (#41371) 2020-10-07 01:15:49 +02:00
Shulyaka 9b947e08bf
Add ZHA Analog Input cluster for XBee (#41311)
* Add ZHA XBee Analog Input cluster

* Fix manufacturer to Digi
2020-10-06 16:01:51 -04:00
HomeAssistant Azure bcfa4ac959 [ci skip] Translation update 2020-10-06 00:08:09 +00:00
HomeAssistant Azure 8d1d585b40 [ci skip] Translation update 2020-10-05 00:04:23 +00:00
HomeAssistant Azure f8c2d877aa [ci skip] Translation update 2020-10-04 00:05:05 +00:00
Abílio Costa 4aacc87425
Indentify IKEA and Phillips motion sensors correctly (#41111) 2020-10-03 19:52:21 -04:00
scheric 861fe36f5d
Use common strings in zha config flow (#41127) 2020-10-03 14:48:26 +02:00
Alexei Chetroi 9765fc13e8
Bump up ZHA dependency (#41109) 2020-10-02 21:25:50 -04:00
Samantha bebf5368c1
Add full command details to exception Debug log (#41070) 2020-10-02 12:18:55 -04:00
Alexei Chetroi f1f23c0453
Better parsing of the ZHA device profile id (#41024) 2020-10-01 21:47:33 -04:00
Alexei Chetroi 9fa23f6479
Bump up zha dependencies (#40914) 2020-09-30 20:53:00 -04:00
David F. Mulcahey ac3a6aaa8c
Bump ZHA quirks lib to 0.0.45 (#40769) 2020-09-29 19:59:12 -04:00
Samantha a8b68dc4f9
Add Neighbors & Endpoint Names to zha/devices reply (#40748)
* Add Neighbors & Endpoint Names to zha/devices reply.

* Remove unused const

* Add tests & correct const name.

* Change tests to use corresponding enum device_type
2020-09-29 15:25:05 -04:00
Alexei Chetroi 47286fbe2a
Refactor permit services to allow joining using install codes (#40652)
* 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
2020-09-28 20:55:08 -04:00
Alexei Chetroi b9823791f7
Bump up ZHA dependency (#40734) 2020-09-28 20:37:56 -04:00
Alexei Chetroi 988bc8b35f
Bump up zha dependency (#40689)
* Bump up zha dependency

* Update ZHA dependency for zigpy
2020-09-27 22:23:53 -04:00
puddly 0a16ae6482
Upgrade zigpy-znp from 0.1.1 to 0.2.0 (#40674) 2020-09-27 18:13:46 -04:00
Alexei Chetroi f09f7feb94
Update schema for zha.set_zigbee_cluster_attribute service (#40600) 2020-09-25 18:36:55 -04:00
springstan 6c8e0e20fb
Add and use light lux constant in entire code base (#40171) 2020-09-23 20:48:01 +02:00
HomeAssistant Azure 75659ff787 [ci skip] Translation update 2020-09-23 00:05:01 +00:00
HomeAssistant Azure 5dcaeebdac [ci skip] Translation update 2020-09-20 00:05:00 +00:00
Alexei Chetroi a9168c04fd
Update ZHA dependencies (#40283) 2020-09-19 12:39:02 -04:00
springstan e330468a13
Use pressure constants in code base (#40262) 2020-09-19 09:26:08 +02:00
springstan 5a12056e59
Add and use volume cubic constants (#40106) 2020-09-15 19:59:26 +02:00
Alexei Chetroi bdaea7879b
Update ZHA dependency (#40083) 2020-09-14 16:48:39 -04:00
Martin 9c40b511f2
Updated warning_device_warn (#39851)
duty_cycle: spec says in inrements of 10
duration: its a 16 bit field
2020-09-09 22:30:40 +02:00
Alexei Chetroi b0b0b15d9d
Update ZHA dependency (#39862) 2020-09-09 15:08:55 -04:00
HomeAssistant Azure 07d5af1969 [ci skip] Translation update 2020-09-08 00:04:13 +00:00
David F. Mulcahey be8aa16170
Don't poll entities for unavailable ZHA devices (#39756)
* Don't poll entities for unavailable ZHA devices

* Update homeassistant/components/zha/entity.py

Co-authored-by: Bas Nijholt <basnijholt@gmail.com>

* cleanup after accepting suggestion

Co-authored-by: Bas Nijholt <basnijholt@gmail.com>
2020-09-07 13:52:00 -04:00
Alexei Chetroi cd0195a27a
Update ZHA dependencies (#39700)
* 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
2020-09-06 23:10:15 -04:00
HomeAssistant Azure c74f187b1f [ci skip] Translation update 2020-09-07 00:03:02 +00:00
David F. Mulcahey f2d21ea735
Update ZHA storage every 10 minutes (#39710) 2020-09-06 15:00:28 -04:00
springstan d2b1918e9c
Drop UNIT_ prefix for percentage constant (#39383) 2020-09-05 21:09:14 +02:00
HomeAssistant Azure bfd6989c75 [ci skip] Translation update 2020-09-04 00:04:26 +00:00
Ville Skyttä 6ae9399237
Upgrade isort to 5.4.2 (#37939) 2020-08-29 08:23:55 +02:00
Ville Skyttä 1bf2c4d976
Upgrade pylint to 2.6.0 (#39363) 2020-08-29 07:59:24 +02:00
Ville Skyttä b4bac0f7a0
Exception chaining and wrapping improvements (#39320)
* 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.
2020-08-28 13:50:32 +02:00
matgad b880c33043
Bump zigpy-cc version (#39318) 2020-08-27 09:36:35 -04:00
Franck Nijhof 1c2ebdf307
Upgrade black to 20.8b1 (#39287) 2020-08-27 13:56:20 +02:00
HomeAssistant Azure 195d4b6897 [ci skip] Translation update 2020-08-27 00:04:55 +00:00
Paulus Schoutsen 3dc79aa60a
Track entity sources (#37258)
Co-authored-by: David Mulcahey <david.mulcahey@me.com>
2020-08-19 14:57:38 +02:00
Phil Bruckner ca9dd0c833
Reorganize trigger code (#38655) 2020-08-17 11:54:56 -05:00
Alexei Chetroi b242b46888
Bump up ZHA dependencies (#38775) 2020-08-11 20:41:49 -04:00
David F. Mulcahey 5802d65ef7
Bump ZHA quirks lib to 0.0.43 (#38762) 2020-08-11 11:14:02 -04:00
David F. Mulcahey 844b3f8d23
Make default duration 1/10th of a second for ZHA light calls (#38739)
* default duration to 1/10th of a second
* update test
2020-08-10 17:40:07 -04:00
David F. Mulcahey 4e56339ba1
add event and device action for when devices drop (#38701) 2020-08-09 20:37:07 -04:00
Pascal Vizeli fd52ff531d
Remove wrong update per core design on ZHA (#38599) 2020-08-06 13:02:32 -04:00
Alexei Chetroi ec17ed9364
ZHA dependencies bump bellows to 0.18.0 (#38043) 2020-07-21 11:42:23 -10:00
David F. Mulcahey d5a03b4d6a
Cleanup async_accept_signal in ZHA (#38009) 2020-07-20 07:04:57 -07:00
David F. Mulcahey bfba44f6bb
Force updates for ZHA light group entity members (Part 2) (#37995) 2020-07-19 15:05:53 -07:00
David F. Mulcahey 2354d0117b
Force updates for ZHA light group entity members (#37961)
* Force updates for ZHA light group entity members

* add a 3 second debouncer to the forced refresh

* lint
2020-07-18 14:47:32 -04:00
Abílio Costa 8beaccf2dd
Change ZHA power unit from kW to W (#37896)
* Change ZHA power unit from kW to W

* Use POWER_WATT

* Move kW to W conversion; ignore unit for power
2020-07-17 10:04:04 -04:00
Alexei Chetroi 33dc015083
Fix ZHA electrical measurement sensor initialization (#37915)
* 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.
2020-07-16 16:25:42 -04:00
J. Nick Koston 1d7f3416d3
Switch async_track_state_change to the faster async_track_state_change_event part 7 (#37870)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-07-14 23:37:25 -07:00
David F. Mulcahey 69d1faea35
bump zigpy and zha quirks (#37859) 2020-07-14 19:34:57 -04:00
Ville Skyttä ac0dbb17af
Attrs cleanups (#37849) 2020-07-14 10:30:30 -07:00
HomeAssistant Azure a6fb9e6100 [ci skip] Translation update 2020-07-03 00:03:38 +00:00
David F. Mulcahey b0942d86fe
Bump ZHA Quirks to 0.0.41 (#37235) 2020-06-29 15:37:42 -07:00
David F. Mulcahey 4fd27e879e
add phillips remote cluster (#37172) 2020-06-27 12:40:34 -04:00
Alexei Chetroi 25b093e69e
Use cached values for divisor/multiplier (#37070) 2020-06-25 09:35:48 -04:00
Franck Nijhof 140fc48ede
Remove invalidation version from ZHA deprecated config options (#37089) 2020-06-25 08:17:31 -04:00
Alexei Chetroi bd42827d43
Don't reset multiplier/divisor on failures (#37066)
If SmartEnergy.Metering channels fails to get multiplier/divisor when
initializing, then keep the old values instead of resetting to 1.
2020-06-24 17:54:11 -04:00
Alexei Chetroi 47220ae4a6
Handle Centralite Pearl thermostat modes (#37065) 2020-06-24 17:52:56 -04:00
David F. Mulcahey 821de0e369
Bump ZHA quirks (#36797) 2020-06-14 14:47:36 -04:00
Alexei Chetroi 36ed3b1177
Add pi_heating/cooling_demand state attributes (#36775) 2020-06-14 00:25:25 -04:00
Alexei Chetroi 5595ef0783
Drop ZHA sensor for Analog/Multistate input clusters (#36696) 2020-06-12 06:08:11 -04:00
Alexei Chetroi 5a3e0c6b25
Cleanup zha.storage from stale devices (#36700) 2020-06-12 06:07:34 -04:00
Alexei Chetroi 8e44d797a3
Fix ZHA Metering channel formatting method (#36697)
Since zigpy change to support bitmap classes, formatting string was incorrectly generated for the newly joined devices with SmartEnergy metering clusters.
2020-06-11 22:37:07 -04:00
Alexei Chetroi 21acdbbbfd
Refactor ZHA Entity availability tracking (#36645)
* Refactor ZHA entity availability

ZHA entity availability tracks on underlying ZHA device availability.

* Update device status without signal.

* Update tests.

* Fix tests.

* Tests for restored devices availability.

* Guard against empty last_seen entry

Refactor device loading a bit.
2020-06-11 17:21:08 -04:00
Alexei Chetroi 4df186787a
Update ZHA dependencies (#36646) 2020-06-10 23:05:14 -04:00
springstan 9311b02369
Use LENGTH_FEET constant (#34053) 2020-06-10 21:38:29 +02:00
HomeAssistant Azure 140fd5adaf [ci skip] Translation update 2020-06-09 00:05:22 +00:00
Alexei Chetroi 1bdbe90d2a
Prevent double ZHA channel initialization (#36554)
* Preven double channel initialization.

* Use a setter for setting ZHA device availability.
2020-06-08 08:54:52 -04:00
Hedda 066784c88f
Update ZHA config flow Zigbee radio description (#35607)
* 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
2020-06-07 20:42:23 -04:00
matgad 14f5cab71d
Bump version zigpy-cc (#36506) 2020-06-06 15:32:26 +02:00
HomeAssistant Azure 492874c4a0 [ci skip] Translation update 2020-06-06 00:03:33 +00:00
Alexei Chetroi 1c329ff708
Process events from ZHA Window Covering Remote (#36489) 2020-06-05 14:11:46 -07:00
Alexei Chetroi dcbe2136cf
Fix ZHA electrical measurement sensor (#36327) 2020-06-01 09:24:56 -04:00
HomeAssistant Azure 564fb1d1e5 [ci skip] Translation update 2020-05-29 00:04:16 +00:00
Alexei Chetroi fe45935f38
Implement Keen vents as zha cover devices (#36080)
* Implement Keen vents as cover devices

* Update homeassistant/components/zha/cover.py
2020-05-24 11:10:16 -04:00
Alexei Chetroi f4c5b9f8f8
Add ZHA roller shadows as cover instead of switch (#36059)
* Implement cover for "Shade" ZHA device type.
* Update ZHA cover tests.
* Add stop command
* Coverage.
2020-05-23 22:37:49 -04:00
Alexei Chetroi 04cfd36d06
Fix ZHA climate hvac_action for Centralite thermostat (#35993)
* 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.
2020-05-23 06:22:36 -04:00
Alexei Chetroi be416d9fc6
No side effects in zha climate properties (#35942)
* No side effects in properties

* Remove logging
2020-05-22 09:24:42 -04:00
HomeAssistant Azure 973f66a974 [ci skip] Translation update 2020-05-22 00:05:00 +00:00
Alexei Chetroi 9907e95c34
Add zha climate (#35682)
* 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
2020-05-20 16:10:50 -04:00
Alexei Chetroi 188255bd81
Bump up ZHA dependencies. (#35797) 2020-05-19 06:50:05 -04:00
HomeAssistant Azure e94f44f294 [ci skip] Translation update 2020-05-17 00:02:56 +00:00
Alexei Chetroi 98523fbb61
Bump up ZHA dependencies (#35706) 2020-05-16 14:30:54 -04:00
HomeAssistant Azure f3bb370b3a [ci skip] Translation update 2020-05-16 00:03:50 +00:00
HomeAssistant Azure 9586e9ebef [ci skip] Translation update 2020-05-15 00:02:56 +00:00
Alexei Chetroi 7e1c836acb
Don't remove deprecated ZHA config option yet (#35627) 2020-05-14 13:50:54 -04:00
Paulus Schoutsen 0efeefe3b2 Update translations 2020-05-13 11:27:21 -07:00
Alexei Chetroi 2f73361381
Bump up ZHA dependecy (#35521)
* Bump up ZHA dependecy
* Fix tests.
2020-05-11 20:22:27 -04:00
Alexei Chetroi 85f129492a
Refactor ZHA config flow (#35397)
* 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.
2020-05-09 09:44:19 -04:00
Alexei Chetroi 54584e970c
Update ZHA zigpy-deconz dependency (#35389) 2020-05-08 17:21:48 -04:00
Alexei Chetroi b844d09797
Bump up zha-device-handlers dependecy for ZHA (#35379) 2020-05-08 10:11:41 -07:00
Alexei Chetroi c71a7b901f
New configuration flow for ZHA integration (#35161)
* 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>
2020-05-06 12:23:53 +02:00
Paulus Schoutsen 34e35f6aa3
Add config flow base strings (#34523) 2020-05-04 20:10:39 -07:00
David F. Mulcahey 8279efc164
Group by endpoints and not by devices for ZHA Zigbee groups (#34583)
* 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>
2020-05-04 15:19:53 -04:00
HomeAssistant Azure 78f846d532 [ci skip] Translation update 2020-05-03 00:02:26 +00:00
Ville Skyttä 435a88636a
Address new issues flagged by flake8 3.8.0a2 (#34964) 2020-04-30 21:37:58 +02:00
Erik Montnemery 066e921a8b
Rename SwitchDevice to SwitchEntity (#34673) 2020-04-26 18:50:37 +02:00
Erik Montnemery e4333a7a44
Rename Light to LightEntity (#34593) 2020-04-26 18:49:41 +02:00
HomeAssistant Azure 90e0a1af8a [ci skip] Translation update 2020-04-26 00:02:45 +00:00
Erik Montnemery 8c5c963b96
Rename CoverDevice to CoverEntity (#34595) 2020-04-25 18:07:15 +02:00
Erik Montnemery b30d117e7d
Rename LockDevice to LockEntity (#34594) 2020-04-25 18:02:41 +02:00
HomeAssistant Azure 5f775c1427 [ci skip] Translation update 2020-04-25 00:08:30 +00:00
Alexei Chetroi 9994554c56
Update ZHA dependency (#34661)
Bump up zigpy-deconz
2020-04-24 16:29:13 -04:00
Erik Montnemery b022e08db9
Rename BinarySensorDevice to BinarySensorEntity (#34462)
* Rename BinarySensorDevice to BinarySensorEntity

* Tweak

* Move deprecation warning to __new__, add test

* Move deprecation warning back to __init__

* Move deprecation warning to __init_subclass
2020-04-23 21:57:07 +02:00
HomeAssistant Azure da87ec8499 [ci skip] Translation update 2020-04-23 00:05:07 +00:00
Joakim Sørensen 730a257f3c
Rename translations dir for integrations (#34494) 2020-04-21 16:11:05 -07:00
HomeAssistant Azure 5007a9e702 [ci skip] Translation update 2020-04-18 00:04:07 +00:00
Paulus Schoutsen 0d60d40512 Update translations 2020-04-16 13:00:10 -07:00
Paulus Schoutsen 55dfca7467
Drop title from translations if brand name (#34306) 2020-04-16 12:52:53 -07:00
Paulus Schoutsen f06aeea385 Update translations 2020-04-15 09:51:07 -07:00
Paulus Schoutsen d36204a968
Move title translation to root (#33850) 2020-04-15 09:41:18 -07:00
Karthikeyan Singaravelan ab493eba96
Import ABC from collections.abc instead of collections for Pyt… (#34077) 2020-04-12 18:00:57 +02:00
David F. Mulcahey 946b77e2ec
Use ZigbeeException instead of DeliveryError in ZHA (#33993)
* Use ZigbeeException instead of DeliveryError

* cleanup get_attributes
2020-04-11 18:01:49 +02:00
Alexei Chetroi 569057c215
Bump up zha dependencies. (#33997) 2020-04-10 23:20:05 -04:00
David F. Mulcahey c1962a4895
Read min and max mireds from ZHA lights (#33983)
* implement min and max mireds

* remove unnecessary else

* additional light test

* add test to appease the codecov god

* change defaults
2020-04-10 23:19:17 -04:00
David F. Mulcahey 5ea4a68aae
Cleanup ZHA metering and electrical measurement channels (#33992)
* clean up homeautomation and smartenergy channels

* fix get attributes on base channel
2020-04-10 20:45:38 -04:00
David F. Mulcahey 13dda7bd98
Cleanup ZHA group entity lifecycle (#33977)
* Clean up ZHA group entity lifecycle

* group entities don't use state restore

* add tests
2020-04-10 13:17:48 -07:00
Alexei Chetroi d494da271a
Bump up ZHA dependencies (#33856) 2020-04-08 21:36:11 -04:00
springstan fca90a8ddc
Improve string formatting v5 (#33697)
* Improve string formatting v5

* Address review comments
2020-04-05 17:48:55 +02:00
Franck Nijhof 39336d3ea3
Add prettier (in pre-commit and CI) (#33693)
* 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
2020-04-05 17:27:16 +02:00
springstan e3bcfb88e7
Improve string formatting v4 (#33668)
* Improve string formatting v4

* Use normal strings instead of f-strings

* Fix zeroconf test by adding back part of a condition
2020-04-05 16:01:41 +02:00
Franck Nijhof 7653dc947a
Enable pylint unnecessary-pass (#33650)
* Enable pylint unnecessary-pass

* Process review suggestions

* Fix smhi tests
2020-04-05 10:33:07 +02:00
springstan dde93304d3
Improve string formatting v2 (#33645)
* Improve string formatting v2

* Improve string formatting v3

* Address review comments
2020-04-04 23:09:34 +02:00
Alexei Chetroi 39a01fcdc6
Update zha dependencies (#33639) 2020-04-04 12:58:43 -04:00
David F. Mulcahey debc1f78d4
Add zigbee information to ZHA device information (#33612)
* add zigbee signature to zha device info

* add typing

* use props and sort clusters

* review comment
2020-04-04 08:40:55 -04:00
Paulus Schoutsen f1d3c0d19b
Remove unused manifest fields (#33595) 2020-04-03 12:58:19 -07:00
Alexei Chetroi eff9b2a1a0
Clean up ZHA channel reporting configuration (#33497) 2020-04-01 11:35:48 -04:00
David F. Mulcahey 3d73f166be
Correct issue on new device joins in ZHA (#33470) 2020-04-01 14:41:16 +02:00
Alexei Chetroi 0e6aacb440
Bump up zha dependencies. (#33488) 2020-03-31 23:33:05 -04:00
David F. Mulcahey d0dad4bfd6
Fix uncaught exceptions in ZHA tests (#33442) 2020-03-30 20:34:23 -04:00
Balazs Sandor 7330e30fd3
bump version zigpy-cc (#33448) 2020-03-30 20:33:07 -04:00
David F. Mulcahey ef61118d49
fix ZHA IASWD commands (#33402) 2020-03-29 17:42:37 -04:00
David F. Mulcahey 188ca630de
Miscellaneous ZHA code cleanup (#33395)
* cleanup state change listener

* update group id handling and unique id

* update test

* add guards for last_seen updates
2020-03-29 13:26:48 -04:00
David F. Mulcahey f7ae78f78e
Update ZHA group entity when Zigbee group membership changes (#33378)
* cleanup group entities

* add test

* appease pylint

* fix order
2020-03-28 20:38:48 -04:00
HomeAssistant Azure 5bedc4ede2 [ci skip] Translation update 2020-03-29 00:04:45 +00:00
David F. Mulcahey 5ce31cb383
Fix ZHA light group on state (#33308) 2020-03-27 23:01:17 -07:00
Paulus Schoutsen 6cafc45d2b
Fix ZHA light crashing on color loop effect (#33298) 2020-03-26 20:23:01 -07:00
David F. Mulcahey 4f767dd3ef
Add entities for ZHA fan groups (#33291)
* 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>
2020-03-26 22:19:48 -04:00
David F. Mulcahey eb8e8d00a6
Add group entities for ZHA switches (#33207) 2020-03-25 13:29:40 -04:00
David F. Mulcahey 2a3c94bad0
Add group entity support to ZHA (#33196)
* 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
2020-03-25 07:23:54 -04:00
Alexei Chetroi 28c2f9caa9
Refactor ZHA platform setup (#33226)
Setup ZHA platforms only after successful gateway startup.
2020-03-24 20:32:46 -04:00
HomeAssistant Azure 763ed0dc7b [ci skip] Translation update 2020-03-24 13:18:47 +00:00
Alexei Chetroi bf4b099f11
Update sw_version in device registry for ZHA devices (#33184)
* 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.
2020-03-23 12:42:41 -04:00
Alexei Chetroi 991afccbd4
Refactor ZHA EventChannels (#32709)
* Refactor EventChannels.

* Rename EventRelayChannel.

* Fully rename EventRelayChannel.

- update docstrings
- rename all references from "relay" to "client"

* Remove CHANNEL_NAME.

* Update stale docstring.
2020-03-21 19:59:32 -04:00
Alexei Chetroi 81cef9a281
Split ZHA device loading and entities adding (#33075)
* 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.
2020-03-21 13:25:43 -04:00
Balazs Sandor e18bea0215
bump version zigpy-cc (#33097) 2020-03-21 10:43:55 -04:00
Alexei Chetroi 1a4199c485
Handle zigpy clusters without ep_attribute attribute. (#33028) 2020-03-19 22:47:08 -04:00
Alexei Chetroi 8cb1d630c8
Poll Hue lights in ZHA (#33017)
* Weighted ZHA entity matching.
* Poll ZHA Hue lights in 5 min intervals.
* Add comment.
* Spelling.
2020-03-19 22:14:07 -04:00
Balazs Sandor 62f2ee5f60
Bump version of zigpy-cc to 0.2.3 (#32951) 2020-03-19 11:42:49 -05:00
Alexei Chetroi c8c81d493d
Refactor ZHA setup (#32959)
* Refactor ZHA setup.
Catch errors and raise if needed.

* Cleanup.
2020-03-19 12:37:47 -04:00
David F. Mulcahey 41cd3ba532
Bump ZHA quirks to 0.0.37 (#32867) 2020-03-16 15:29:14 -04:00
David F. Mulcahey aa972b0005
Fix handling of attribute reports in ZHA sensors and binary sensors (#32776)
* Update sensor tests.

* Update light tests.

* Update binary_sensor tests.

* Update cover tests.

* Update device tracker tests.

* Update fan tests.

* Update lock tests.

* Update switch tests.

* add sensor attr to sensors

* add sensor attr to binary sensors

* cleanup extra var

Co-authored-by: Alexei Chetroi <alexei.chetroi@outlook.com>
2020-03-13 19:17:50 -04:00
David F. Mulcahey 7127492767
Additional ZHA cleanup (#32678)
* fix double device loading in tests

* change imports

* None is default
2020-03-11 13:37:28 +01:00
David F. Mulcahey 4248893007
Clean up custom polling in ZHA device and light (#32653)
* 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
2020-03-11 07:17:53 -04:00
Alexei Chetroi 87b770be08
Add PollControl cluster support to ZHA (#32618)
* Poll control channel

Set check-in interval to 55min.
Set long-poll interval to 6s.

* Update tests.

* Don't use magic numbers.
2020-03-09 19:55:25 -04:00
Alexei Chetroi 743833e5f3
Bump up ZHA dependencies. (#32609)
* Bump up ZHA dependencies.

* Update tests to match library changes.
2020-03-09 12:39:41 -04:00
Alexei Chetroi 7e781946fa
Refactor ZHA device keep alive checker (#32561)
* 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.
2020-03-07 13:52:45 -05:00
David F. Mulcahey 732457745f
Add guard to ZHA device triggers (#32559) 2020-03-07 12:59:18 -05:00
David F. Mulcahey e52542c4d7
Allow multiple attribute reads in ZHA (#32498)
* 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
2020-03-07 07:33:59 -05:00
Alexei Chetroi dd91b51435
Make ZHA Scene channel an eventable channel. (#32546) 2020-03-06 17:32:26 -05:00
David F. Mulcahey b5022f5bcb
guard against invalid trigger and action scenarios (#32512) 2020-03-05 15:52:09 -05:00
Paulus Schoutsen 7b5b909f0a
ZHA Dependencies bump (#32483)
* ZHA Dependencies bump.

* Bump up ZHA dependencies.
2020-03-04 17:35:07 -08:00
Alexei Chetroi e416f17e4d
ZHA: Successful pairing feedback (#32456) 2020-03-04 19:27:37 -05:00
HomeAssistant Azure 104350265d [ci skip] Translation update 2020-03-04 18:13:24 +00:00
Alexei Chetroi 20333703c5
Remove ZHA attribute listening channel (#32468)
* remove AttributeListeningChannel
* pull sleeps
* update signature to fix pylint
2020-03-04 13:11:53 -05:00
Alexei Chetroi 896df9267a
Fix ZHA device healthcheck pings (#32425) 2020-03-03 13:37:17 -05:00
David F. Mulcahey 2ba514253c
Bump ZHA Quirks to 0.0.34 (#32401)
* bump zha quirks version

* add required parts to support alt opple remote
2020-03-02 11:26:37 -05:00
Robert Chmielowiec 8e3492d4f5
ZHA: Support light flashing (#32234) 2020-02-29 18:37:06 -05:00
Alexei Chetroi 5fbaaf41dc
Bump up ZHA depdendency (#32336) 2020-02-28 19:13:49 -05:00
springstan f1a0ca7cd3
Add and use percentage constant (#32094)
* Add and use percentage constant

* Fix pylint error and broken test
2020-02-28 11:46:48 -08:00
Ville Skyttä 9b2544c923
Remove some unneeded pylint suppressions (#32152) 2020-02-24 16:47:15 -08:00
springstan a85808e325
Add and use time related constants (#32065)
* 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
2020-02-23 22:09:24 +02:00
HomeAssistant Azure 8257165562 [ci skip] Translation update 2020-02-23 00:31:50 +00:00
Alexei Chetroi 3385893b77
ZHA device channel refactoring (#31971)
* 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.
2020-02-21 18:06:57 -05:00
springstan 1ee7c483a7
Update file headers and outdated documentation links (#32022)
* Update documentation links

* Update file headers v2
2020-02-20 15:29:46 -08:00
HomeAssistant Azure 5839df39b5 [ci skip] Translation update 2020-02-20 00:31:46 +00:00
David F. Mulcahey 8255bdf3d5
Bump ZHA quirks and add skip configuration support (#31982)
* add skip configuration
* Bump quirks
* add skip configuration to FakeDevice
2020-02-19 09:19:26 -05:00
Balazs Sandor 41f3fb291a Add ZHA Texas Instruments CC device support (#31621) 2020-02-09 12:13:22 -05:00
Alexei Chetroi 57ab30d534 Bump ZHA dependencies. (#31619)
Bump up zigpy-homeassistant==0.13.2
2020-02-08 06:50:50 -05:00
HomeAssistant Azure 274cf23269 [ci skip] Translation update 2020-02-07 00:31:50 +00:00
Alexei Chetroi 0e68ace3dd
Bump ZHA dependencies. (#31555) 2020-02-06 16:34:28 -05:00
David F. Mulcahey 06c8e53323
bump quirks (#31355) 2020-01-31 13:55:06 -05:00