From cd773455f0c4e098bba2bc565a1496066901391c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?So=C3=B3s=20P=C3=A9ter?= Date: Sun, 25 Nov 2018 12:21:26 +0100 Subject: [PATCH] Fix false log message on CAPsMAN only devices (#18687) * Fix false log message on CAPsMAN only devices False debug log message appeared on CAPsMAN only devices without physichal wireless interfaces. This fix eliminates them. * Fixed indentation to pass flake8 test --- homeassistant/components/device_tracker/mikrotik.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/homeassistant/components/device_tracker/mikrotik.py b/homeassistant/components/device_tracker/mikrotik.py index 5b69c13afa6..587872db839 100644 --- a/homeassistant/components/device_tracker/mikrotik.py +++ b/homeassistant/components/device_tracker/mikrotik.py @@ -128,7 +128,8 @@ class MikrotikScanner(DeviceScanner): librouteros.exceptions.ConnectionError): self.wireless_exist = False - if not self.wireless_exist or self.method == 'ip': + if not self.wireless_exist and not self.capsman_exist \ + or self.method == 'ip': _LOGGER.info( "Mikrotik %s: Wireless adapters not found. Try to " "use DHCP lease table as presence tracker source. "