Bump pytile and re-order imports (#28570)
This commit is contained in:
parent
005a1b2713
commit
e69cd271dd
3 changed files with 4 additions and 10 deletions
|
@ -2,6 +2,8 @@
|
|||
import logging
|
||||
from datetime import timedelta
|
||||
|
||||
from pytile import async_login
|
||||
from pytile.errors import SessionExpiredError, TileError
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant.components.device_tracker import PLATFORM_SCHEMA
|
||||
|
@ -43,8 +45,6 @@ PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend(
|
|||
|
||||
async def async_setup_scanner(hass, config, async_see, discovery_info=None):
|
||||
"""Validate the configuration and return a Tile scanner."""
|
||||
from pytile import async_login
|
||||
|
||||
websession = aiohttp_client.async_get_clientsession(hass)
|
||||
|
||||
config_file = hass.config.path(
|
||||
|
@ -89,8 +89,6 @@ class TileScanner:
|
|||
|
||||
async def async_init(self):
|
||||
"""Further initialize connection to the Tile servers."""
|
||||
from pytile.errors import TileError
|
||||
|
||||
try:
|
||||
await self._client.async_init()
|
||||
except TileError as err:
|
||||
|
@ -105,10 +103,6 @@ class TileScanner:
|
|||
|
||||
async def _async_update(self, now=None):
|
||||
"""Update info from Tile."""
|
||||
from pytile.errors import SessionExpiredError, TileError
|
||||
|
||||
_LOGGER.debug("Updating Tile data")
|
||||
|
||||
try:
|
||||
await self._client.async_init()
|
||||
tiles = await self._client.tiles.all(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue