Fix MercedesMe - add check for unsupported features (#12342)

* Add check for unsupported features

* Lint fix

* change to guard clause
This commit is contained in:
Rene Nulsch authored and Paulus Schoutsen committed 2018-02-12 21:07:20 -08:00
1 parent 66d14da5e9
commit 00ff305bd7
4 files changed
+20 -8

No files matched your search

@@ -49,10 +49,13 @@ class MercedesMEDeviceTracker(object):
def update_info(self, now=None):
"""Update the device info."""
for device in self.data.cars:
_LOGGER.debug("Updating %s", device["vin"])
if not device['services'].get('VEHICLE_FINDER', False):
continue
location = self.data.get_location(device["vin"])
if location is None:
return False
continue
dev_id = device["vin"]
name = device["license"]