Skip to content
This repository has been archived by the owner on Mar 11, 2021. It is now read-only.

Commit

Permalink
Skip devices not supporting ZDO lqi_mgmt_req.
Browse files Browse the repository at this point in the history
Samjin multisensor reports itself as a router, even though it is an end device.
  • Loading branch information
Adminiuga committed Sep 1, 2019
1 parent ae74eb7 commit 4aea068
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions custom_components/zha_map/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ def _pending(self):
n
for n in self._seen.values()
if not n.neighbours
and n.supported
and n.device is not None
and n.device_type
in (NeighbourType.Coordinator.name, NeighbourType.Router.name)
Expand Down
2 changes: 2 additions & 0 deletions custom_components/zha_map/neighbour.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ class Neighbour(LogMixin):
manufacturer = attr.ib(default=None)
neighbours = attr.ib(factory=list)
offline = attr.ib(factory=bool)
supported = attr.ib(default=True)

@classmethod
def new_from_record(cls, record):
Expand Down Expand Up @@ -123,6 +124,7 @@ async def scan(self):
)
self.debug("neighbor request Status: %s. Response: %r", status, val)
if zdo_t.Status.SUCCESS != status:
self.supported = False
self.debug("device does not support 'Mgmt_Lqi_req'")
return

Expand Down

0 comments on commit 4aea068

Please sign in to comment.