Tado device_tracker exception when mobile device has geofencing enabled but location is currently unknown. (#6401)

This commit is contained in:
Job Vermeulen 2017-03-05 21:38:14 +01:00 committed by Pascal Vizeli
parent 1a139234af
commit bc9f2d21c4

View File

@ -142,7 +142,7 @@ class TadoDeviceScanner(DeviceScanner):
# Find devices that have geofencing enabled, and are currently at home. # Find devices that have geofencing enabled, and are currently at home.
for mobile_device in tado_json: for mobile_device in tado_json:
if 'location' in mobile_device: if mobile_device.get('location'):
if mobile_device['location']['atHome']: if mobile_device['location']['atHome']:
device_id = mobile_device['id'] device_id = mobile_device['id']
device_name = mobile_device['name'] device_name = mobile_device['name']