mirror of
https://github.com/tomaae/homeassistant-mikrotik_router.git
synced 2025-07-06 15:34:31 +02:00
Added wireless host signal information, fixes #413
This commit is contained in:
parent
477c68cf55
commit
332b1a6657
2 changed files with 16 additions and 1 deletions
|
@ -2056,6 +2056,10 @@ class MikrotikCoordinator(DataUpdateCoordinator[None]):
|
|||
{"name": "interface", "default": "unknown"},
|
||||
{"name": "ap", "type": "bool"},
|
||||
{"name": "uptime"},
|
||||
{"name": "signal-strength"},
|
||||
{"name": "tx-ccq"},
|
||||
{"name": "tx-rate"},
|
||||
{"name": "rx-rate"},
|
||||
],
|
||||
)
|
||||
|
||||
|
@ -2094,7 +2098,14 @@ class MikrotikCoordinator(DataUpdateCoordinator[None]):
|
|||
wireless_detected[uid] = True
|
||||
self.ds["host"][uid]["available"] = True
|
||||
self.ds["host"][uid]["last-seen"] = utcnow()
|
||||
for key in ["mac-address", "interface"]:
|
||||
for key in [
|
||||
"mac-address",
|
||||
"interface",
|
||||
"signal-strength",
|
||||
"tx-ccq",
|
||||
"tx-rate",
|
||||
"rx-rate",
|
||||
]:
|
||||
self.ds["host"][uid][key] = vals[key]
|
||||
|
||||
# Add hosts from DHCP
|
||||
|
|
|
@ -16,6 +16,10 @@ DEVICE_ATTRIBUTES_HOST = [
|
|||
"authorized",
|
||||
"bypassed",
|
||||
"last-seen",
|
||||
"signal-strength",
|
||||
"tx-ccq",
|
||||
"tx-rate",
|
||||
"rx-rate",
|
||||
]
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue