Skip to content

Commit

Permalink
Fix discovery
Browse files Browse the repository at this point in the history
  • Loading branch information
Dmitry Mamontov committed Apr 15, 2022
1 parent ff84f6b commit 0dd49ae
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion custom_components/miwifi/discovery.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,12 @@ def parse_leafs(devices: list, leafs: list) -> list:
"""

for leaf in leafs:
if "ip" not in leaf or len(leaf["ip"]) == 0:
if (
"ip" not in leaf
or len(leaf["ip"]) == 0
or "hardware" not in leaf
or len(leaf["hardware"]) == 0
):
continue

devices.append(leaf["ip"].strip())
Expand Down

0 comments on commit 0dd49ae

Please sign in to comment.