moved imports to top level (#27495)

pull/27559/head
bouni 2019-10-12 21:52:34 +02:00 committed by Paulus Schoutsen
parent 2c8e24eb14
commit 8436acbffa
1 changed files with 2 additions and 4 deletions

View File

@ -6,6 +6,8 @@ import logging
import os
from aiohttp import web
import aioautomatic
import voluptuous as vol
from homeassistant.components.device_tracker import (
@ -82,7 +84,6 @@ def _write_refresh_token_to_file(hass, filename, refresh_token):
@asyncio.coroutine
def async_setup_scanner(hass, config, async_see, discovery_info=None):
"""Validate the configuration and return an Automatic scanner."""
import aioautomatic
hass.http.register_view(AutomaticAuthCallbackView())
@ -215,7 +216,6 @@ class AutomaticData:
@asyncio.coroutine
def handle_event(self, name, event):
"""Coroutine to update state for a real time event."""
import aioautomatic
self.hass.bus.async_fire(EVENT_AUTOMATIC_UPDATE, event.data)
@ -261,7 +261,6 @@ class AutomaticData:
@asyncio.coroutine
def ws_connect(self, now=None):
"""Open the websocket connection."""
import aioautomatic
self.ws_close_requested = False
@ -321,7 +320,6 @@ class AutomaticData:
@asyncio.coroutine
def get_vehicle_info(self, vehicle):
"""Fetch the latest vehicle info from automatic."""
import aioautomatic
name = vehicle.display_name
if name is None: