Commit Graph

304 Commits (783672d305b8390d6e3ea2f49622b644de6c46ef)

Author SHA1 Message Date
David F. Mulcahey 85d2ba047b Protect against bad data stored in ZHA (#30183) 2019-12-23 19:11:35 -05:00
Alexei Chetroi fdaaabf070
ZHA binary_sensor cleanup. (#30149) 2019-12-22 14:07:49 -05:00
Alexei Chetroi 83768be814 Refactor ZHA binary_sensor (#30138)
* Refactor ZHA binary_sensor.

Use ZHA entity class registry for channel specific implementations.

* Remove registries.BINARY_SENSOR_TYPES dict.

* Address PR comments.
2019-12-22 13:24:57 -05:00
Alexei Chetroi 9c23c4adf2
Cleanup ZHAEntity class (#30131)
Remove `_domain` attribute since we're not using it anymore.
2019-12-21 18:33:00 -05:00
Alexei Chetroi 8e3dfbd5c9
Refactor ZHA electrical measurement sensor. (#30130) 2019-12-21 17:15:50 -05:00
Alexei Chetroi fb3bb8220b
Implement ZHA entity classes registry (#30108)
* ZHA Entity registry.
Match a zha_device and channels to a ZHA entity.

* Refactor ZHA sensor to use registry.
* Remove sensor_types registry.
* Fix ZHA device tracker battery remaining.
* Remove should_poll/force_update attributes.
* Fix binary_sensor regression.
* isort.
* Pylint.
* Don't access protected members.
* Address comments and fix spelling.
* Make pylint happy again.
2019-12-21 16:26:58 -05:00
HomeAssistant Azure 95a6a7502a [ci skip] Translation update 2019-12-16 00:32:25 +00:00
Alexei Chetroi 7685c76b9b
Defer log formatting. (#29888) 2019-12-12 14:16:02 -05:00
Alexei Chetroi 327b5c3c94
Log ZHA bind/unbind operations status (#29842)
* Log bind/unbind operation result.
* Use ZDO consts.
* Use device logger for bind/unbind results.
* Lint.
2019-12-12 12:16:51 -05:00
Alexei Chetroi 315d0064fe
Fix zha circular import (#29802)
* Refactor zha.core.helpers.
* Make zha isort-able.
* Const import reorg.
* Keep DATA_ZHA config key on entry unload.
* Cleanup ZHA config flow.
* isort.
* Add test.
2019-12-10 00:00:04 -05:00
HomeAssistant Azure 12f273eb11 [ci skip] Translation update 2019-12-10 00:32:16 +00:00
David F. Mulcahey 1222aa8c56 Add ZHA group API (#29641)
* add skeleton to retrieve zigbee groups
* get single group
* add a group
* return group members with group
* add comment
* fix group members
* add function to add device to group
* add group members
* add remove from group method
* add api to remove members from group
* add remove groups method
* clean up group add and remove
* fix remove group
* fix remove groups
* add api to get only groupable devices
* change var init
* add tests
* address review comment
2019-12-09 14:50:04 -05:00
Bas Nijholt 6cc75fc6f3 Sort imports according to PEP8 for components starting with "Z" (#29784)
* use isort to sort imports for components starting with 'z'

* add skip to end of zha/core/channels/__init__.py

* put 'pylint: disable=import-error' at the right place

* remove the import of config_flow in zha/__init__.py

According to @balloob it is no longer needed.

* revert previous commit

* isort:skip homeassistant/components/zha/__init__.py completely
2019-12-09 18:54:54 +01:00
springstan 1ee8057662 Move imports to top for zha (#29555)
* Move imports to top for zha
* Move back some imports, add annotation for disabling import-outside-toplevel
* Move import config_flow before import api
2019-12-06 16:12:46 -05:00
HomeAssistant Azure 8dc366c75b [ci skip] Translation update 2019-11-29 00:32:07 +00:00
Ville Skyttä 99c7608fb4 Lint config cleanups (#28864)
* Remove bunch of unneeded lint exclusions

* Use symbolic names instead of identifiers in pylint disables

* Tighten scope of some pylint disables
2019-11-25 22:40:08 -08:00
Alexei Chetroi 4ba2bd232c Command arguments for issue_zigbee_cluster_commands. (#28885) 2019-11-20 08:34:06 -05:00
Abílio Costa e60ae77f1b Add ZHA service to issue group commands (#28823)
* add service to ZHA to issue group commands
* fix args
2019-11-19 19:49:09 -05:00
Ville Skyttä d88ca0f5cb Lint exclusions (#28655)
* Remove malformed pylint disable markers

* Remove some unused imports

* Remove some unneeded lint exclusions

* Remove more unneeded lint exclusions

* Add specific codes to all noqa's
2019-11-16 10:22:07 +01:00
David F. Mulcahey 376e3def1d Bump ZHA quirks to 0.0.28 (#28750) 2019-11-13 09:25:45 -05:00
Alexei Chetroi cfa689c3a6
Bump up ZHA dependencies. (#28711) 2019-11-11 20:53:23 -05:00
David F. Mulcahey f2c56cff43 Bump ZHA quirks version (#28636) 2019-11-08 09:12:50 -08:00
HomeAssistant Azure 265c390b65 [ci skip] Translation update 2019-11-07 00:32:16 +00:00
HomeAssistant Azure 4863face69 [ci skip] Translation update 2019-11-02 00:31:48 +00:00
Alexei Chetroi 89213a4ce8
Don't set entity_id in ZHA entities (#28362)
* Don't set entity_id on ZHA entities.
* Update tests.
* Use comma as separator for multiple channel names.
* Address PR comments.
2019-10-31 12:31:06 -04:00
HomeAssistant Azure 72dee7dd21 [ci skip] Translation update 2019-10-28 00:32:16 +00:00
Alexei Chetroi 969322e14a Fixes/zha ieee tail (#28160)
* Fix ZHA entity_id assignment.

* Update tests.
2019-10-24 12:23:02 -04:00
Paulus Schoutsen 23289459ca Update translations 2019-10-23 13:36:38 -07:00
HomeAssistant Azure 2cc039dbc4 [ci skip] Translation update 2019-10-22 00:32:10 +00:00
Alexei Chetroi fe7c45b363
Move remaining of ZHA imports to top level. (#28071)
* Move ZHA import to top level.
* ZHA tests: move imports to top level.
2019-10-21 19:30:56 -04:00
Alexei Chetroi a0c50f4794 Leverage zigpy for IEEE address conversions (#27972)
* Refactor EUI64 conversions.

* Update ZHA dependencies.

* Update tests.
2019-10-21 13:14:17 -04:00
HomeAssistant Azure 9e8c391c81 [ci skip] Translation update 2019-10-19 00:32:15 +00:00
HomeAssistant Azure b8e00925e7 [ci skip] Translation update 2019-10-16 00:32:17 +00:00
HomeAssistant Azure d8e3255603 [ci skip] Translation update 2019-10-15 00:31:44 +00:00
Erik Montnemery c7bd0fe909 Fix ZHA regressions caused by "Support async validation of device trigger" (#27401)
* Revert "Support async validation of device trigger (#27333)"

This reverts commit fdf4f398a7.

* Revert only ZHA changes

* Fix whitespace

* Restore ZHA changes but add check to make sure ZHA is loaded

* Address review comment

* Remove additional check
2019-10-14 14:11:43 -04:00
HomeAssistant Azure b37f0ad812 [ci skip] Translation update 2019-10-14 00:32:27 +00:00
HomeAssistant Azure 62b886a5d5 [ci skip] Translation update 2019-10-13 00:31:39 +00:00
HomeAssistant Azure 78a08d0425 [ci skip] Translation update 2019-10-12 00:31:47 +00:00
HomeAssistant Azure 4c71c6df6f [ci skip] Translation update 2019-10-11 00:31:40 +00:00
HomeAssistant Azure 762a714d87 [ci skip] Translation update 2019-10-10 00:31:40 +00:00
Erik Montnemery fdf4f398a7
Support async validation of device trigger (#27333) 2019-10-09 21:04:11 +02:00
Sébastien RAMAGE 1257706bd9 Update zigpy-zigate to 0.4.1 (#27345)
* Update zigpy-zigate to 0.4.1

Fix #27297

* Update zigpy-zigate to 0.4.1

Fix #27297
2019-10-09 08:47:43 -04:00
HomeAssistant Azure 768bb00177 [ci skip] Translation update 2019-10-09 00:32:17 +00:00
Erik Montnemery 0ba4ee1398 Validate generated device actions (#27262)
* Validate generated actions

* Use hass.services.async_call instead of service.async_call_from_config
2019-10-08 10:06:17 -07:00
HomeAssistant Azure 1087abd3b5 [ci skip] Translation update 2019-10-08 00:32:12 +00:00
Erik Montnemery dabdf8b577 Validate generated device triggers (#27264)
* Validate generated trigger

* Update scaffold
2019-10-07 13:09:48 -07:00
Ville Skyttä 761d7f21e9 Upgrade pylint (#27279)
* Upgrade pylint to 2.4.2 and astroid to 2.3.1

https://pylint.readthedocs.io/en/latest/whatsnew/2.4.html
https://pylint.readthedocs.io/en/latest/whatsnew/changelog.html#what-s-new-in-pylint-2-4-1
https://pylint.readthedocs.io/en/latest/whatsnew/changelog.html#what-s-new-in-pylint-2-4-2

* unnecessary-comprehension fixes

* invalid-name fixes

* self-assigning-variable fixes

* Re-enable not-an-iterable

* used-before-assignment fix

* invalid-overridden-method fixes

* undefined-variable __class__ workarounds

https://github.com/PyCQA/pylint/issues/3090

* no-member false positive disabling

* Remove some no longer needed disables

* using-constant-test fix

* Disable import-outside-toplevel for now

* Disable some apparent no-value-for-parameter false positives

* invalid-overridden-method false positive disables

https://github.com/PyCQA/pylint/issues/3150

* Fix unintentional Entity.force_update override in AfterShipSensor
2019-10-07 08:17:39 -07:00
HomeAssistant Azure 85947591c5 [ci skip] Translation update 2019-10-04 00:32:16 +00:00
HomeAssistant Azure e005f6f23a [ci skip] Translation update 2019-10-03 00:34:28 +00:00
Alexei Chetroi e011a94ce9 Bump up ZHA dependencies. (#27127) 2019-10-02 15:51:52 -07:00