From 99d6d7c43b605421d3f73e67a9fccca02ae76743 Mon Sep 17 00:00:00 2001 From: tomaae <23486452+tomaae@users.noreply.github.com> Date: Mon, 13 Apr 2020 08:13:26 +0200 Subject: [PATCH] do not create device tracker for wlan interface --- custom_components/mikrotik_router/device_tracker.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/custom_components/mikrotik_router/device_tracker.py b/custom_components/mikrotik_router/device_tracker.py index 467fd08..22da288 100644 --- a/custom_components/mikrotik_router/device_tracker.py +++ b/custom_components/mikrotik_router/device_tracker.py @@ -116,6 +116,14 @@ def update_items(inst, config_entry, mikrotik_controller, async_add_entities, tr [MikrotikControllerPortDeviceTracker, MikrotikControllerHostDeviceTracker], ): for uid in mikrotik_controller.data[sid]: + + # No device tracker for wlan + if ( + sid == "interface" + and mikrotik_controller.data[sid][uid]["type"] == "wlan" + ): + continue + if ( not config_entry.options.get(CONF_TRACK_HOSTS, DEFAULT_TRACK_HOSTS) and sid == "host"