Allow direct binding via ZHA for the ZLL profile (#23536)

* allow binding for zll profile
* update check - review comment
This commit is contained in:
David F. Mulcahey 2019-04-29 11:35:19 -04:00 committed by Alexei Chetroi
parent e08f2ad18d
commit 75f53b2799
2 changed files with 11 additions and 8 deletions

View file

@ -321,15 +321,18 @@ class ZHADevice:
}
@callback
def async_get_zha_clusters(self):
"""Get zigbee home automation clusters for this device."""
from zigpy.profiles.zha import PROFILE_ID
def async_get_std_clusters(self):
"""Get ZHA and ZLL clusters for this device."""
from zigpy.profiles import zha, zll
return {
ep_id: {
IN: endpoint.in_clusters,
OUT: endpoint.out_clusters
} for (ep_id, endpoint) in self._zigpy_device.endpoints.items()
if ep_id != 0 and endpoint.profile_id == PROFILE_ID
if ep_id != 0 and endpoint.profile_id in (
zha.PROFILE_ID,
zll.PROFILE_ID
)
}
@callback