mirror of
https://github.com/tomaae/homeassistant-mikrotik_router.git
synced 2025-08-03 01:14:30 +02:00
fixed tracking of hosts connected directly to mikrotik port that is using bridge
This commit is contained in:
parent
9b9d54c3c4
commit
d1ac4c1e88
1 changed files with 5 additions and 1 deletions
|
@ -307,12 +307,16 @@ class MikrotikControllerData:
|
|||
and self.data["host"][uid]["address"] != "unknown"
|
||||
and self.data["host"][uid]["interface"] != "unknown"
|
||||
):
|
||||
tmp_interface = self.data["host"][uid]["interface"]
|
||||
if uid in self.data["arp"] and self.data["arp"][uid]["bridge"] != "":
|
||||
tmp_interface = self.data["arp"][uid]["bridge"]
|
||||
|
||||
self.data["host"][uid][
|
||||
"available"
|
||||
] = await self.hass.async_add_executor_job(
|
||||
self.api_ping.arp_ping,
|
||||
self.data["host"][uid]["address"],
|
||||
self.data["host"][uid]["interface"],
|
||||
tmp_interface,
|
||||
)
|
||||
|
||||
# Update last seen
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue