Skip to content

Use xbee endpoint as source if set #175

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions zigpy_znp/zigbee/application.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import zigpy.zdo.types as zdo_t
import zigpy.application
from zigpy.types import deserialize as list_deserialize
from zigpy.config import CONF_ADDITIONAL_ENDPOINTS
from zigpy.exceptions import DeliveryError

import zigpy_znp.const as const
Expand Down Expand Up @@ -912,8 +913,9 @@ def _find_endpoint(self, dst_ep: int, profile: int, cluster: int) -> int:
return ZDO_ENDPOINT

# Newer Z-Stack releases ignore profiles and will work properly with endpoint 1
if self._zstack_build_id >= 20210708:
return ZHA_ENDPOINT
if not self.config.get(CONF_ADDITIONAL_ENDPOINTS):
if self._zstack_build_id >= 20210708:
return ZHA_ENDPOINT

# Always fall back to endpoint 1
candidates = [ZHA_ENDPOINT]
Expand Down