Skip to content

Commit f526739

Browse files
committed
If additional ep configured, skip build id check
1 parent 824c2b2 commit f526739

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

zigpy_znp/zigbee/application.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020
import zigpy.application
2121
from zigpy.types import deserialize as list_deserialize
2222
from zigpy.exceptions import DeliveryError
23+
from zigpy.config import CONF_ADDITIONAL_ENDPOINTS
24+
2325

2426
import zigpy_znp.const as const
2527
import zigpy_znp.types as t
@@ -912,8 +914,9 @@ def _find_endpoint(self, dst_ep: int, profile: int, cluster: int) -> int:
912914
return ZDO_ENDPOINT
913915

914916
# Newer Z-Stack releases ignore profiles and will work properly with endpoint 1
915-
if self._zstack_build_id >= 20210708:
916-
return ZHA_ENDPOINT
917+
if not self.config.get(CONF_ADDITIONAL_ENDPOINTS):
918+
if self._zstack_build_id >= 20210708:
919+
return ZHA_ENDPOINT
917920

918921
# Always fall back to endpoint 1
919922
candidates = [ZHA_ENDPOINT]

0 commit comments

Comments
 (0)