From e62e67e918750268000621ed9e9aa61633fb5c4e Mon Sep 17 00:00:00 2001 From: tomaae <23486452+tomaae@users.noreply.github.com> Date: Thu, 9 Apr 2020 22:36:34 +0200 Subject: [PATCH] do not track wireless devices marked as AP #24 --- custom_components/mikrotik_router/mikrotik_controller.py | 3 +++ custom_components/mikrotik_router/strings.json | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/custom_components/mikrotik_router/mikrotik_controller.py b/custom_components/mikrotik_router/mikrotik_controller.py index 57d62d4..ce3b4a1 100644 --- a/custom_components/mikrotik_router/mikrotik_controller.py +++ b/custom_components/mikrotik_router/mikrotik_controller.py @@ -890,6 +890,9 @@ class MikrotikControllerData: if self.support_wireless: wireless_detected = {} for uid, vals in self.data["wireless_hosts"].items(): + if vals["ap"] == "yes": + continue + if uid not in self.data["host"]: self.data["host"][uid] = {} diff --git a/custom_components/mikrotik_router/strings.json b/custom_components/mikrotik_router/strings.json index ed027e3..fab15de 100644 --- a/custom_components/mikrotik_router/strings.json +++ b/custom_components/mikrotik_router/strings.json @@ -32,7 +32,9 @@ "data": { "scan_interval": "Scan interval (requires HA restart)", "track_iface_clients": "Show client MAC and IP on interfaces", - "unit_of_measurement": "Unit of measurement" + "unit_of_measurement": "Unit of measurement", + "track_network_clients": "Track network devices", + "scan_interval": "Scan interval (requires HA restart)" } } }