diff --git a/homeassistant/components/device_tracker/luci.py b/homeassistant/components/device_tracker/luci.py index f3567ab17f3..9dbf503fc94 100644 --- a/homeassistant/components/device_tracker/luci.py +++ b/homeassistant/components/device_tracker/luci.py @@ -102,9 +102,11 @@ class LuciDeviceScanner(object): params={'auth': self.token}) if result: self.last_results = [] - for x in result: - # Check if the Flags for each device contain NUD_REACHABLE and if so, add it to last_results - if int(x['Flags'], 16) & 0x2: self.last_results.append(x['HW address']) + for device_entry in result: + # Check if the Flags for each device contain + # NUD_REACHABLE and if so, add it to last_results + if int(device_entry['Flags'], 16) & 0x2: + self.last_results.append(device_entry['HW address']) return True