Handle Share off for events in OwnTracks app (#1737)

This commit is contained in:
Greg Dowling 2016-04-07 20:21:25 +01:00 committed by Paulus Schoutsen
parent 29c30861bf
commit a7f80608c6

View File

@ -80,6 +80,11 @@ def setup_scanner(hass, config, see):
if not isinstance(data, dict) or data.get('_type') != 'transition':
return
if data.get('desc') is None:
_LOGGER.error(
"Location missing from `enter/exit` message - "
"please turn `Share` on in OwnTracks app")
return
# OwnTracks uses - at the start of a beacon zone
# to switch on 'hold mode' - ignore this
location = data['desc'].lstrip("-")