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

Commit

Permalink
Update neighbour.py (#4)
Browse files Browse the repository at this point in the history
prevent infinity loop
  • Loading branch information
jkkwon83 authored and Adminiuga committed Jan 20, 2020
1 parent c246984 commit 7e341b3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions custom_components/zha_map/neighbour.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,10 @@ async def scan(self):
idx += 1
if idx >= val.Entries:
break
if len(neighbors) <= 0:
idx += 1
self.debug("Neighbor count is 0 (idx : %d)", idx)

await asyncio.sleep(random.uniform(1.0, 1.5))
self.debug("Querying next starting at %s", idx)

Expand Down

0 comments on commit 7e341b3

Please sign in to comment.