mirror of
https://github.com/tomaae/homeassistant-mikrotik_router.git
synced 2025-06-25 18:28:46 +02:00
Added captive portal authorized clients count #200
This commit is contained in:
parent
981668032e
commit
e14d018b20
2 changed files with 23 additions and 0 deletions
|
@ -1381,6 +1381,7 @@ class MikrotikControllerData:
|
|||
{"name": "uptime_epoch", "default": 0},
|
||||
{"name": "clients_wired", "default": 0},
|
||||
{"name": "clients_wireless", "default": 0},
|
||||
{"name": "captive_authorized", "default": 0},
|
||||
],
|
||||
)
|
||||
|
||||
|
@ -1547,6 +1548,13 @@ class MikrotikControllerData:
|
|||
],
|
||||
)
|
||||
|
||||
auth_hosts = sum(
|
||||
1
|
||||
for uid in self.data["hostspot_host"]
|
||||
if self.data["hostspot_host"][uid]["authorized"]
|
||||
)
|
||||
self.data["resource"]["captive_authorized"] = auth_hosts
|
||||
|
||||
# ---------------------------
|
||||
# get_queue
|
||||
# ---------------------------
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue