Fixed flake8 style errors

pull/841/head
xifle 2016-01-03 17:42:49 +01:00
parent 82904c59ce
commit d244d3b599
1 changed files with 5 additions and 6 deletions

View File

@ -1,6 +1,6 @@
"""
homeassistant.components.device_tracker.owntracks
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
OwnTracks platform for the device tracker.
For more details about this platform, please refer to the documentation at
@ -18,6 +18,7 @@ CONF_TRANSITION_EVENTS = 'use_events'
LOCATION_TOPIC = 'owntracks/+/+'
EVENT_TOPIC = 'owntracks/+/+/event'
def setup_scanner(hass, config, see):
""" Set up an OwnTracks tracker. """
@ -50,7 +51,6 @@ def setup_scanner(hass, config, see):
see(**kwargs)
def owntracks_event_update(topic, payload, qos):
""" MQTT event (geofences) received. """
@ -67,7 +67,6 @@ def setup_scanner(hass, config, see):
if not isinstance(data, dict) or data.get('_type') != 'transition':
return
# check if in "home" fence or other zone
location = ''
if data['event'] == 'enter':
@ -80,7 +79,8 @@ def setup_scanner(hass, config, see):
elif data['event'] == 'leave':
location = STATE_NOT_HOME
else:
logging.getLogger(__name__).error('Misformatted mqtt msgs, _type=transition, event=%s',
logging.getLogger(__name__).error(
'Misformatted mqtt msgs, _type=transition, event=%s',
data['event'])
return
@ -96,7 +96,6 @@ def setup_scanner(hass, config, see):
see(**kwargs)
use_events = config.get(CONF_TRANSITION_EVENTS)
if use_events: