Skip to content

Commit

Permalink
properly add neighbours to right object (#34)
Browse files Browse the repository at this point in the history
  • Loading branch information
peterbaumert authored Jan 24, 2022
1 parent 226ee8a commit ef48aef
Showing 1 changed file with 8 additions and 14 deletions.
22 changes: 8 additions & 14 deletions unifi_respondd/respondd_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -305,22 +305,16 @@ def getNeighbours(self):
aps = self._aps
neighbours = []
for ap in aps.accesspoints:
nbs = {}
for neighbour_mac in ap.neighbour_macs:
if neighbour_mac is not None:
neighbours.append(
NeighboursInfo(
node_id=ap.mac.replace(":", ""),
batadv={
ap.mac: Neighbours(
neighbours={
neighbour_mac: NeighbourDetails(
tq=255, lastseen=0.45
)
}
)
},
)
)
nbs[neighbour_mac] = NeighbourDetails(tq=255, lastseen=0.45)
neighbours.append(
NeighboursInfo(
node_id=ap.mac.replace(":", ""),
batadv={ap.mac: Neighbours(neighbours=nbs)},
)
)
return neighbours

def listenMulticast(self):
Expand Down

0 comments on commit ef48aef

Please sign in to comment.