do not create device tracker for wlan interface

This commit is contained in:
tomaae 2020-04-13 08:13:26 +02:00
parent 8cf278be64
commit 99d6d7c43b

View file

@ -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"