OwnTracks robustness improvement

This commit is contained in:
Paulus Schoutsen 2015-10-03 09:09:31 -07:00
parent 8b5b580287
commit 8490d6126a

View File

@ -33,7 +33,7 @@ def setup_scanner(hass, config, see):
'Unable to parse payload as JSON: %s', payload)
return
if data.get('_type') != 'location':
if not isinstance(data, dict) or data.get('_type') != 'location':
return
parts = topic.split('/')