From 90029557874db3351d493252c211fdd6e8d86847 Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Tue, 19 Nov 2019 20:07:17 +0100 Subject: [PATCH] Move import to top for aftership (#28860) --- homeassistant/components/aftership/sensor.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/aftership/sensor.py b/homeassistant/components/aftership/sensor.py index c41e5aec7b5..ff5edc92ba0 100644 --- a/homeassistant/components/aftership/sensor.py +++ b/homeassistant/components/aftership/sensor.py @@ -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]