Move import to top for aftership (#28860)

pull/28881/head
Franck Nijhof 2019-11-19 20:07:17 +01:00 committed by Paulus Schoutsen
parent 2d4b038b48
commit 9002955787
1 changed files with 2 additions and 2 deletions

View File

@ -2,6 +2,7 @@
from datetime import timedelta
import logging
from pyaftership.tracker import Tracking
import voluptuous as vol
from homeassistant.components.sensor import PLATFORM_SCHEMA
@ -11,6 +12,7 @@ import homeassistant.helpers.config_validation as cv
from homeassistant.helpers.dispatcher import async_dispatcher_send
from homeassistant.helpers.entity import Entity
from homeassistant.util import Throttle
from .const import DOMAIN
_LOGGER = logging.getLogger(__name__)
@ -56,8 +58,6 @@ PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend(
async def async_setup_platform(hass, config, async_add_entities, discovery_info=None):
"""Set up the AfterShip sensor platform."""
from pyaftership.tracker import Tracking
apikey = config[CONF_API_KEY]
name = config[CONF_NAME]