forked from home-assistant/core
OwnTracks robustness improvement
This commit is contained in:
@@ -33,7 +33,7 @@ def setup_scanner(hass, config, see):
|
|||||||
'Unable to parse payload as JSON: %s', payload)
|
'Unable to parse payload as JSON: %s', payload)
|
||||||
return
|
return
|
||||||
|
|
||||||
if data.get('_type') != 'location':
|
if not isinstance(data, dict) or data.get('_type') != 'location':
|
||||||
return
|
return
|
||||||
|
|
||||||
parts = topic.split('/')
|
parts = topic.split('/')
|
||||||
|
Reference in New Issue
Block a user