From 40f95e95f22a474818d9426d500c952b05956141 Mon Sep 17 00:00:00 2001 From: tomaae <23486452+tomaae@users.noreply.github.com> Date: Sun, 23 May 2021 01:17:54 +0200 Subject: [PATCH] Some devices have manufacturer name "detect" #127 --- custom_components/mikrotik_router/mikrotik_controller.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/custom_components/mikrotik_router/mikrotik_controller.py b/custom_components/mikrotik_router/mikrotik_controller.py index fc91e89..46e6b70 100644 --- a/custom_components/mikrotik_router/mikrotik_controller.py +++ b/custom_components/mikrotik_router/mikrotik_controller.py @@ -1805,7 +1805,7 @@ class MikrotikControllerData: self.data["host"][uid]["host-name"] = uid # Resolve manufacturer - if vals["manufacturer"] == "detect" and vals["address"] != "unknown": + if vals["manufacturer"] == "detect" and vals["mac-address"] != "unknown": try: self.data["host"][uid][ "manufacturer" @@ -1813,6 +1813,9 @@ class MikrotikControllerData: except: self.data["host"][uid]["manufacturer"] = "" + if vals["manufacturer"] == "detect": + self.data["host"][uid]["manufacturer"] = "" + # --------------------------- # process_accounting # ---------------------------