Commit Graph

19 Commits (bc006c9ecc0708044ec6fbb879a3e2f4a7769849)

Author SHA1 Message Date
tkdrob 3baeed3684
Clean up constants (#47323) 2021-03-05 19:08:04 +01:00
Franck Nijhof 65cf2fcb6f
Drop asynctest (#44746) 2021-01-01 22:31:56 +01: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 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
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
Alexei Chetroi 52fe1328f6
ZHA tests refactoring (#31744)
* Refactor ZHA fixtures.
Patch Zigpy radio libs instead of ZHA when setting up fixtures.
Use new fixtures for binary_sensor.zha platform.

* Update ZHA api tests.
* Update ZHA channels and discovery tests.
* Update ZHA cover tests.
* Update device action/trigger tests.
* Update device_tracker.zha platform tests.
* Update fan.zha platform tests.
* Update ZHA gateway tests.
* Update lock.zha platform tests.
* Update switch.zha platform tests.
* Update sensor.zha platform tests.
* Update light.zha platform tests.
* Use MockConfigEntry.
* Address PR comments.
2020-02-12 16:12:14 -05:00
Alexei Chetroi 28eeed1db3
ZHA tests refactoring (#31682)
* Fixtures for restoring/joning a device.

* binary_sensor.zha tests.

* cover.zha platform tests.

* device_tracker.zha platform tests.

* fan.zha platform tests.

* switch.zha platform tests.

* Update light.zha platform tests.

* Update sensor.zha platform tests.

* ZHA api tests refactoring.

* Update lock.zha platform tests.

* Update ZHA gateway tests.

* Update zha device action tests.

* Update zha device trigger tests.

* Cleanup.
2020-02-09 21:45:35 -05: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
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
David F. Mulcahey 6f2ac705eb
Add web socket API command to get a single ZHA device (#26196)
* get single device web socket command

* test get single device

* add not found error

* fix handling when device doesn't exist

* add test for zha device not found
2019-08-26 09:54:19 -04:00
Alexei Chetroi 77e4ff94fd ZHA code cleanup. (#25644)
* isort ZHA imports.

* Sort zha channel registry.

* Sort ZHA core registry.

* Sort ZHA core consts.
2019-08-02 06:05:23 -04:00
Paulus Schoutsen 4de97abc3a Black 2019-07-31 12:25:30 -07:00
David F. Mulcahey 300384410f
Refactor ZHA gateway into modules and add admin protections to API (#22023)
* refactor

* cleanup

* fix tests

* admin all the things
2019-03-14 10:20:25 -04:00
David F. Mulcahey 901b2b4ba3
new websocket api way (#21533) 2019-02-28 19:32:41 -05:00
David F. Mulcahey 3f9e6a7064 Add power source to device and clean up zha listeners (#21174)
check available and add comments

ensure order on API test
2019-02-18 16:55:41 +01:00
David F. Mulcahey 80442e655d
Update ZHA API to be device oriented (#20990)
* update cluster API

* swap to device focused API

* update test
2019-02-12 15:05:02 -05:00
David F. Mulcahey 868820c424
add device info API (#20950) 2019-02-11 14:38:04 -05:00
David F. Mulcahey 326010629c
Add some api tests for ZHA (#20909)
* start API tests

* blank lines
2019-02-10 06:29:36 -05:00