Sort imports according to PEP8 for gpslogger (#29717)

This commit is contained in:
Bas Nijholt 2019-12-09 11:15:02 +01:00 committed by Franck Nijhof
parent c5316dbc39
commit ebb2722d03
3 changed files with 15 additions and 12 deletions

View file

@ -1,30 +1,33 @@
"""Support for GPSLogger.""" """Support for GPSLogger."""
import logging import logging
import voluptuous as vol
from aiohttp import web from aiohttp import web
import voluptuous as vol
import homeassistant.helpers.config_validation as cv from homeassistant.components.device_tracker import (
from homeassistant.components.device_tracker import ATTR_BATTERY ATTR_BATTERY,
DOMAIN as DEVICE_TRACKER,
)
from homeassistant.const import ( from homeassistant.const import (
HTTP_UNPROCESSABLE_ENTITY,
HTTP_OK,
ATTR_LATITUDE, ATTR_LATITUDE,
ATTR_LONGITUDE, ATTR_LONGITUDE,
CONF_WEBHOOK_ID, CONF_WEBHOOK_ID,
HTTP_OK,
HTTP_UNPROCESSABLE_ENTITY,
) )
from homeassistant.helpers import config_entry_flow from homeassistant.helpers import config_entry_flow
import homeassistant.helpers.config_validation as cv
from homeassistant.helpers.dispatcher import async_dispatcher_send from homeassistant.helpers.dispatcher import async_dispatcher_send
from homeassistant.components.device_tracker import DOMAIN as DEVICE_TRACKER
from .const import ( from .const import (
DOMAIN,
ATTR_ALTITUDE,
ATTR_ACCURACY, ATTR_ACCURACY,
ATTR_ACTIVITY, ATTR_ACTIVITY,
ATTR_ALTITUDE,
ATTR_DEVICE, ATTR_DEVICE,
ATTR_DIRECTION, ATTR_DIRECTION,
ATTR_PROVIDER, ATTR_PROVIDER,
ATTR_SPEED, ATTR_SPEED,
DOMAIN,
) )
_LOGGER = logging.getLogger(__name__) _LOGGER = logging.getLogger(__name__)

View file

@ -1,7 +1,7 @@
"""Config flow for GPSLogger.""" """Config flow for GPSLogger."""
from homeassistant.helpers import config_entry_flow from homeassistant.helpers import config_entry_flow
from .const import DOMAIN
from .const import DOMAIN
config_entry_flow.register_webhook_flow( config_entry_flow.register_webhook_flow(
DOMAIN, DOMAIN,

View file

@ -1,15 +1,15 @@
"""Support for the GPSLogger device tracking.""" """Support for the GPSLogger device tracking."""
import logging import logging
from homeassistant.core import callback from homeassistant.components.device_tracker import SOURCE_TYPE_GPS
from homeassistant.components.device_tracker.config_entry import TrackerEntity
from homeassistant.const import ( from homeassistant.const import (
ATTR_BATTERY_LEVEL, ATTR_BATTERY_LEVEL,
ATTR_GPS_ACCURACY, ATTR_GPS_ACCURACY,
ATTR_LATITUDE, ATTR_LATITUDE,
ATTR_LONGITUDE, ATTR_LONGITUDE,
) )
from homeassistant.components.device_tracker import SOURCE_TYPE_GPS from homeassistant.core import callback
from homeassistant.components.device_tracker.config_entry import TrackerEntity
from homeassistant.helpers import device_registry from homeassistant.helpers import device_registry
from homeassistant.helpers.dispatcher import async_dispatcher_connect from homeassistant.helpers.dispatcher import async_dispatcher_connect
from homeassistant.helpers.restore_state import RestoreEntity from homeassistant.helpers.restore_state import RestoreEntity