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
|
import logging
|
||||||
from datetime import timedelta
|
from datetime import timedelta
|
||||||
|
|
||||||
|
from pytile import async_login
|
||||||
|
from pytile.errors import SessionExpiredError, TileError
|
||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
|
|
||||||
from homeassistant.components.device_tracker import PLATFORM_SCHEMA
|
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):
|
async def async_setup_scanner(hass, config, async_see, discovery_info=None):
|
||||||
"""Validate the configuration and return a Tile scanner."""
|
"""Validate the configuration and return a Tile scanner."""
|
||||||
from pytile import async_login
|
|
||||||
|
|
||||||
websession = aiohttp_client.async_get_clientsession(hass)
|
websession = aiohttp_client.async_get_clientsession(hass)
|
||||||
|
|
||||||
config_file = hass.config.path(
|
config_file = hass.config.path(
|
||||||
|
@ -89,8 +89,6 @@ class TileScanner:
|
||||||
|
|
||||||
async def async_init(self):
|
async def async_init(self):
|
||||||
"""Further initialize connection to the Tile servers."""
|
"""Further initialize connection to the Tile servers."""
|
||||||
from pytile.errors import TileError
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
await self._client.async_init()
|
await self._client.async_init()
|
||||||
except TileError as err:
|
except TileError as err:
|
||||||
|
@ -105,10 +103,6 @@ class TileScanner:
|
||||||
|
|
||||||
async def _async_update(self, now=None):
|
async def _async_update(self, now=None):
|
||||||
"""Update info from Tile."""
|
"""Update info from Tile."""
|
||||||
from pytile.errors import SessionExpiredError, TileError
|
|
||||||
|
|
||||||
_LOGGER.debug("Updating Tile data")
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
await self._client.async_init()
|
await self._client.async_init()
|
||||||
tiles = await self._client.tiles.all(
|
tiles = await self._client.tiles.all(
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
"name": "Tile",
|
"name": "Tile",
|
||||||
"documentation": "https://www.home-assistant.io/integrations/tile",
|
"documentation": "https://www.home-assistant.io/integrations/tile",
|
||||||
"requirements": [
|
"requirements": [
|
||||||
"pytile==3.0.0"
|
"pytile==3.0.1"
|
||||||
],
|
],
|
||||||
"dependencies": [],
|
"dependencies": [],
|
||||||
"codeowners": [
|
"codeowners": [
|
||||||
|
|
|
@ -1609,7 +1609,7 @@ python_opendata_transport==0.1.4
|
||||||
pythonegardia==1.0.40
|
pythonegardia==1.0.40
|
||||||
|
|
||||||
# homeassistant.components.tile
|
# homeassistant.components.tile
|
||||||
pytile==3.0.0
|
pytile==3.0.1
|
||||||
|
|
||||||
# homeassistant.components.touchline
|
# homeassistant.components.touchline
|
||||||
pytouchline==0.7
|
pytouchline==0.7
|
||||||
|
|
Loading…
Add table
Reference in a new issue