From 53ca4f4910384016e6d1fc20d1074fb0616ee4b2 Mon Sep 17 00:00:00 2001 From: Conrad Kreyling Date: Mon, 11 Dec 2023 15:59:12 -0500 Subject: [PATCH 1/2] Fix ZGP profile and endpoint handling --- zigpy_znp/zigbee/application.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/zigpy_znp/zigbee/application.py b/zigpy_znp/zigbee/application.py index 214e8241..f0880314 100644 --- a/zigpy_znp/zigbee/application.py +++ b/zigpy_znp/zigbee/application.py @@ -691,6 +691,9 @@ def _find_endpoint(self, dst_ep: int, profile: int, cluster: int) -> int: if dst_ep == ZDO_ENDPOINT: return ZDO_ENDPOINT + + if profile == zigpy.profiles.zgp.PROFILE_ID: + return zigpy.profiles.zgp.GREENPOWER_ENDPOINT_ID # Newer Z-Stack releases ignore profiles and will work properly with endpoint 1 if ( From daafd620d980557b3aecba6e9ac1ce88d9a7453d Mon Sep 17 00:00:00 2001 From: Conrad Kreyling Date: Mon, 11 Dec 2023 16:15:01 -0500 Subject: [PATCH 2/2] Linter --- zigpy_znp/zigbee/application.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zigpy_znp/zigbee/application.py b/zigpy_znp/zigbee/application.py index f0880314..1ae94367 100644 --- a/zigpy_znp/zigbee/application.py +++ b/zigpy_znp/zigbee/application.py @@ -691,7 +691,7 @@ def _find_endpoint(self, dst_ep: int, profile: int, cluster: int) -> int: if dst_ep == ZDO_ENDPOINT: return ZDO_ENDPOINT - + if profile == zigpy.profiles.zgp.PROFILE_ID: return zigpy.profiles.zgp.GREENPOWER_ENDPOINT_ID