diff --git a/homeassistant/components/device_tracker/ubus.py b/homeassistant/components/device_tracker/ubus.py index dd12df7b070..3d7ef5cef6e 100644 --- a/homeassistant/components/device_tracker/ubus.py +++ b/homeassistant/components/device_tracker/ubus.py @@ -103,6 +103,9 @@ class UbusDeviceScanner(DeviceScanner): """Return the name of the given device or None if we don't know.""" if self.mac2name is None: self._generate_mac2name() + if self.mac2name is None: + # Generation of mac2name dictionary failed + return None name = self.mac2name.get(device.upper(), None) return name