mirror of
https://github.com/home-assistant/core.git
synced 2025-12-24 12:59:34 +00:00
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
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
import asyncio
|
||||
|
||||
import pytest
|
||||
import zigpy.profiles.zha
|
||||
import zigpy.types
|
||||
import zigpy.zcl.clusters.closures as closures
|
||||
import zigpy.zcl.clusters.general as general
|
||||
@@ -41,7 +42,7 @@ def zigpy_cover_device(zigpy_device_mock):
|
||||
|
||||
endpoints = {
|
||||
1: {
|
||||
"device_type": 1026,
|
||||
"device_type": zigpy.profiles.zha.DeviceType.IAS_ZONE,
|
||||
"in_clusters": [closures.WindowCovering.cluster_id],
|
||||
"out_clusters": [],
|
||||
}
|
||||
@@ -55,7 +56,7 @@ def zigpy_cover_remote(zigpy_device_mock):
|
||||
|
||||
endpoints = {
|
||||
1: {
|
||||
"device_type": 0x0203,
|
||||
"device_type": zigpy.profiles.zha.DeviceType.WINDOW_COVERING_CONTROLLER,
|
||||
"in_clusters": [],
|
||||
"out_clusters": [closures.WindowCovering.cluster_id],
|
||||
}
|
||||
@@ -69,7 +70,7 @@ def zigpy_shade_device(zigpy_device_mock):
|
||||
|
||||
endpoints = {
|
||||
1: {
|
||||
"device_type": 512,
|
||||
"device_type": zigpy.profiles.zha.DeviceType.SHADE,
|
||||
"in_clusters": [
|
||||
closures.Shade.cluster_id,
|
||||
general.LevelControl.cluster_id,
|
||||
@@ -87,7 +88,7 @@ def zigpy_keen_vent(zigpy_device_mock):
|
||||
|
||||
endpoints = {
|
||||
1: {
|
||||
"device_type": 3,
|
||||
"device_type": zigpy.profiles.zha.DeviceType.LEVEL_CONTROLLABLE_OUTPUT,
|
||||
"in_clusters": [general.LevelControl.cluster_id, general.OnOff.cluster_id],
|
||||
"out_clusters": [],
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user