mirror of
https://github.com/tomaae/homeassistant-mikrotik_router.git
synced 2025-07-16 04:14:31 +02:00
Added dhcp client ip to interfaces, ref #321
This commit is contained in:
parent
f9edb6c1fe
commit
242f8142d2
1 changed files with 7 additions and 1 deletions
|
@ -974,7 +974,12 @@ class MikrotikCoordinator(DataUpdateCoordinator[None]):
|
||||||
self.ds["interface"][uid]["client-mac-address"] = "multiple"
|
self.ds["interface"][uid]["client-mac-address"] = "multiple"
|
||||||
|
|
||||||
if self.ds["interface"][uid]["client-ip-address"] == "":
|
if self.ds["interface"][uid]["client-ip-address"] == "":
|
||||||
self.ds["interface"][uid]["client-ip-address"] = "none"
|
if self.ds["interface"][uid]["name"] in self.ds["dhcp-client"]:
|
||||||
|
self.ds["interface"][uid]["client-ip-address"] = self.ds[
|
||||||
|
"dhcp-client"
|
||||||
|
][self.ds["interface"][uid]["name"]]["address"]
|
||||||
|
else:
|
||||||
|
self.ds["interface"][uid]["client-ip-address"] = "none"
|
||||||
|
|
||||||
if self.ds["interface"][uid]["client-mac-address"] == "":
|
if self.ds["interface"][uid]["client-mac-address"] == "":
|
||||||
self.ds["interface"][uid]["client-mac-address"] = "none"
|
self.ds["interface"][uid]["client-mac-address"] = "none"
|
||||||
|
@ -1968,6 +1973,7 @@ class MikrotikCoordinator(DataUpdateCoordinator[None]):
|
||||||
vals=[
|
vals=[
|
||||||
{"name": "interface", "default": "unknown"},
|
{"name": "interface", "default": "unknown"},
|
||||||
{"name": "status", "default": "unknown"},
|
{"name": "status", "default": "unknown"},
|
||||||
|
{"name": "address", "default": "unknown"},
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue