1
mirror of https://github.com/home-assistant/core synced 2024-09-12 15:16:21 +02:00
Commit Graph

250 Commits

Author SHA1 Message Date
David F. Mulcahey
a644c2e8ba
Add alarm control panel support to ZHA (#49080)
* start implementation of IAS ACE

* starting alarm control panel

* enums

* use new enums from zigpy

* fix import

* write state

* fix registries after rebase

* remove extra line

* cleanup

* fix deprecation warning

* updates to catch up with codebase evolution

* minor updates

* cleanup

* implement more ias ace functionality

* cleanup

* make config helper work for supplied section

* connect to configuration

* use ha async_create_task

* add some tests

* remove unused restore method

* update tests

* add tests from panel POV

* dynamically include alarm control panel config

* fix import

Co-authored-by: Alexei Chetroi <lexoid@gmail.com>
2021-04-27 10:58:59 -04:00
David F. Mulcahey
b91d2be00b
Better ZHA device reconfiguration (#49672)
* initial take

* cleanup

* fix mock for configure_reporting
2021-04-27 10:04:22 -04:00
Alexei Chetroi
4a6bb96a0f
Stop fast polling of a Zigbee device after a check-in command (#49685)
* Stop fast polling after a check-in

* Update tests
2021-04-25 21:15:04 -04:00
jan iversen
c351098f04
HomeAssistantType —> HomeAssistant for Integrations p* - s* (#49558) 2021-04-22 19:58:02 +02:00
jan iversen
9879b7becf
Rename HomeAssistantType to HomeAssistant, integrations w* - z* (#49543)
* Integration zha: HomeAssistantType -> HomeAssistant.

* Integration zerproc: HomeAssistantType -> HomeAssistant.

* Integration xbox: HomeAssistantType -> HomeAssistant.

* Integration wunderground: HomeAssistantType -> HomeAssistant.

* Integration wled: HomeAssistantType -> HomeAssistant.

* Integration water_heater: HomeAssistantType -> HomeAssistant.

* Integration websocket_api: HomeAssistantType -> HomeAssistant.

* Integration wilight: HomeAssistantType -> HomeAssistant.
2021-04-22 11:04:28 -04:00
Marc Mueller
c07646db5d
Update typing syntax (#49480)
* Update typing syntax

* Replace typing imports with ones from collections where possible

* Changes after review
2021-04-20 17:40:41 +02:00
puddly
5d57e5c06c
Enable the custom quirks path ZHA config option (#49143) 2021-04-13 13:14:53 -04:00
Abílio Costa
ebc2bec08d
Reduce reporting delta for ZHA humidity channel (#49070) 2021-04-12 12:02:59 -04:00
David F. Mulcahey
fe80afdb86
Add support for custom configurations in ZHA (#48423)
* initial configuration options

* first crack at saving the data

* constants

* implement initial options

* make more dynamic

* fix unload and reload of the config entry

* update unload
2021-04-12 07:08:42 -04:00
Marc Mueller
8e2b5b36b5
Bump pyupgrade to 2.12.0 (#48943) 2021-04-09 09:58:27 -07:00
Alexei Chetroi
6204765835
Implement Ignore list for poll control configuration on Ikea devices (#48667)
Co-authored-by: Hmmbob <33529490+hmmbob@users.noreply.github.com>
2021-04-04 21:21:47 -07:00
David F. Mulcahey
aa0292974a
support feedback for ZHA device reconfiguration (#48447) 2021-03-30 16:35:51 -04:00
Marc Mueller
2956eb0902
Update pylint to 2.7.3 (#48488)
* Update pylint to 2.7.3

* Add class-const-naming-style

* Remove unused-import message

* Additional cleanup
2021-03-29 18:02:56 -10:00
Jesse Campbell
67791fa4df
ZHA lock code services and events (#47208)
* ZHA lock code services and events

* ZHA Locks: A few more services, use the library functions

* Catch exception when command id is not in command list

* Add tests for lock code services

* Add tests for enable/disable

* Better document code slot ID shifting

* Simplify cluster commands
2021-03-27 15:23:40 -04:00
Franck Nijhof
f4cc4a0896
Merge of nested IF-IF cases - X-Z (#48373) 2021-03-26 17:08:05 +01:00
Franck Nijhof
6932cf9534
Use contextlib.suppress where possible (#48189) 2021-03-23 14:36:43 +01:00
Franck Nijhof
dc15f243e6
Upgrade pyupgrade to v2.11.0 (#48220) 2021-03-22 13:29:39 +01:00
xonestonex
9739707f62
Preset support for MOES thermostat valves (#48178) 2021-03-21 18:03:23 -04:00
Marc Mueller
dcca29ef68
Update typing 14 (#48078) 2021-03-18 15:08:35 +01:00
David F. Mulcahey
547fd7d352
fix exception on device removal (#47803) 2021-03-12 21:06:37 -05:00
B-Hartley
ee2658f9e6
Add (some) of ZCL concentration clusters to ZHA component (#47590)
* Update registries.py

Add concentration clusters recently added to zigpy

* Update measurement.py

Add concentration clusters recently added to ZigPy

* Update sensor.py

Add concentration clusters recently added to ZigPy

* Update sensor.py

remove unnecessary tabs

* Update measurement.py

remove unnecessary tabs

* Update sensor.py

Just adding CO and CO2 for now.

* Update registries.py

Just adding CO2 and CO for now.

* Update measurement.py

Just adding CO2 and CO for now

* Update sensor.py

import const CONCENTRATION_PARTS_PER_MILLION

* Update registries.py

removed trailing whitespace

* Update sensor.py

added extra blank lines and removed trailing whitespace

* Update measurement.py

added extra blank lines and removed trailing whitespace

* Update sensor.py

add device classes for CO and CO2
2021-03-08 11:22:13 -05:00
tkdrob
3baeed3684
Clean up constants (#47323) 2021-03-05 19:08:04 +01:00
Quentame
198ecb0945
Uniformize platform setup (#47101)
* A platform is not a component

* Fix dynalite

* SUPPORTED_PLATFORMS --> PLATFORMS

* In tests

* In tests 2

* Fix SmartThings

* Fix ZHA test

* Fix Z-Wave

* Revert Z-Wave

* Use PLATFORMS const in ambient_station

* Fix ihc comment
2021-03-02 21:43:59 +01:00
Ville Skyttä
dc880118a4
Lint suppression cleanups (#47248)
* Unused pylint suppression cleanups

* Remove outdated pylint bug references

* Add flake8-noqa config and note to run it every now and then

* Add codes to noqa's

* Unused noqa cleanups
2021-03-02 09:02:04 +01:00
Marc Mueller
16dcbf1467
Update pylint (#47205) 2021-02-28 22:09:01 -10:00
Franck Nijhof
dd8d4471ec
Postponed evaluation of annotations for integrations (#46455) 2021-02-12 18:54:00 +01:00
Philip Allgaier
392c058d34
Ensure consistent spelling of "ID" (#44585) 2020-12-28 18:34:08 +01:00
David F. Mulcahey
e601f62416
Default smartenergy multiplier and divisor (#44257) 2020-12-15 10:44:28 -05:00
Shulyaka
0b8529a472
Add zha AnalogOutput cluster support (#44092)
* Initial commit
* black
* isort
* Commit suggestion from code review
Co-authored-by: Alexei Chetroi <lexoid@gmail.com>

* pylint
* removed entity cache for present_value
* fix discovery
* move write_attributes to channel
* write_attributes fix
* write_attributes yet another fix
* update_before_add=False
* mains powered test device
* removed test_restore_state
* flake8
* removed async_configure_channel_specific
* don't know what this patch does, removing
* test for async_update
* removed node_descriptor
* fix unit_of_measurement
Co-authored-by: Alexei Chetroi <lexoid@gmail.com>
2020-12-14 15:32:45 -05:00
Paulus Schoutsen
594e905742
Remove invalidation_version from deprecated (#44156)
* Remove invalidation_version from deprecated. We don't follow up and just hurts releases

* Revert change to ZHA
2020-12-12 22:24:16 +01:00
Alexei Chetroi
51f9da94e1
Exclude coordinator when looking up group members entity IDs (#44058) 2020-12-08 14:34:26 -05:00
Alexei Chetroi
a1720fdd2b
Cleanup ZHA fan channel (#43973)
* Use zigpy cached values for ZHA Fan speed

* Disable update_before_add for ZHA fans

* Refresh state of the group

* Fix group tests
2020-12-05 18:24:49 -05:00
Alexei Chetroi
40e5634db3
Add ZHA Coordinator to LightLink cluster groups (#43959)
* Add coordinator to LighLink cluster groups

* Make pylint happy
2020-12-05 11:20:10 -05:00
Alexei Chetroi
125ceb7449
Refactor ZHA core channel initialization (#43953)
* Cleanup Basic channnel

Remove unused methods.

* Refactor async_configure() method

Split async_configure() into async_configure() and
async_configure_channel_specfici()

* Refactor async_initilize() method

Split into two different methods and configure channel specifics via
async_configure_channel_specific()

* Fixes
2020-12-04 18:45:09 -05:00
Abílio Costa
8f3989e7d9
Remove unused stuff from ZHA registries (#43786) 2020-12-01 09:21:25 -05:00
David F. Mulcahey
54425ae0f3
Use the correct property for full init event (#43745) 2020-11-29 11:59:23 -05:00
David F. Mulcahey
a2e1efca33
Add additional events to enhance the ZHA device pairing experience (#43729)
* support better feedback in the device pairing UI

* update pairing events
2020-11-28 17:29:56 -05:00
Erik Montnemery
a5e5c5c7e6
Exclude disabled entities from async_entries_for_device (#43665) 2020-11-27 09:03:44 +01:00
Alexei Chetroi
e32669a2d9
Remove zigpy monkey patching (#43456)
* Use event handler for incoming messages from zigpy

* Bump up zha dependency
2020-11-20 20:02:52 -05:00
Alexei Chetroi
54c4e9335f
Refactor ZHA sensor initialization (#43339)
* 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
2020-11-18 21:34:12 -05:00
Alexei Chetroi
84569549f8
Refactor ZHA light initialization (#43149)
* Refactor ZHA light initialization

* Don't do redundant attribute reads
2020-11-14 17:24:41 -05:00
Paulus Schoutsen
3af1771616
Include device_id in ZHA event (#43037) 2020-11-10 12:43:15 +01:00
springstan
30b94892c4
Use strings instead of f-strings for constants (#40619) 2020-11-09 10:09:53 +01:00
Alexei Chetroi
4b7829d777
Allow ZHA coordinator binding/unbinding (#42854)
* Allow coordinator ZDO binding/unbinding operations

* Let coordinator to provide endpoint it

* Refactor ClusterPair to a dataclass

* Rename ClusterPair
2020-11-06 17:33:13 -05:00
Alexei Chetroi
9ccc49411a
Refactor ZHA light state restoration after a restart (#42726)
* Restore ZHA light state and level

* Restore state and color temp from zigpy cache
2020-11-01 17:19:36 -05:00
Alexei Chetroi
8868028dcd
Bump up ZHA dependencies (#42679)
* Bump up ZHA dependencies

* Fix tests because of zigpy request signature change
2020-11-01 11:05:55 -05:00
walthowd
09bd449698
Send pro-active IAS Enroll Response (#42282)
* Send pro-active IAS Enroll Response 

Some zigbee devices require a pro-active IAS enroll response to be sent before they will send their IAS enroll request.  This PR sends a single IAS enroll response after CIE write and fixes some of these devices including the Ecolink 4655BC0-R and many others. 

This also more closely aligns with the default behavior of Smartthings and zigbee2mqtt which also send pro-active enroll requests:

b217b91bb7 (diff-6d00af5fc389c40b8c4dfc390d80e3eca3946d331dff84afdc1632cb5568bca2)

Thanks to @puddly for helping figure this all out and @tubalainen for testing.

* flake8 fixes

* flake8 again
2020-10-24 21:41:27 -04:00
Philip Allgaier
dde6305549
Cleanup unused loggers (components N-Z + tests) (#41982) 2020-10-16 21:24:08 -05:00
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
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