From dadcf922908748a4f77460146d713871cb89b813 Mon Sep 17 00:00:00 2001 From: Johann Kellerman Date: Fri, 2 Sep 2016 00:02:35 +0200 Subject: [PATCH] Allow 'None' MAC to be loaded from known_devices (#3102) --- homeassistant/components/device_tracker/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/homeassistant/components/device_tracker/__init__.py b/homeassistant/components/device_tracker/__init__.py index b260eccd7d1..a4f65ab4ea4 100644 --- a/homeassistant/components/device_tracker/__init__.py +++ b/homeassistant/components/device_tracker/__init__.py @@ -388,7 +388,8 @@ def load_config(path: str, hass: HomeAssistantType, consider_home: timedelta): try: return [ Device(hass, consider_home, device.get('track', False), - str(dev_id).lower(), str(device.get('mac')).upper(), + str(dev_id).lower(), None if device.get('mac') is None + else str(device.get('mac')).upper(), device.get('name'), device.get('picture'), device.get('gravatar'), device.get(CONF_AWAY_HIDE, DEFAULT_AWAY_HIDE))