Fix issues with new tile 2020 devices (#28133)
* Update meteoalertapi to version 0.1.6 * Fix tile to supporting 2020 tile devicespull/28143/head
parent
852cbad965
commit
09b322b8a4
|
@ -43,7 +43,7 @@ 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 Client
|
||||
from pytile import async_login
|
||||
|
||||
websession = aiohttp_client.async_get_clientsession(hass)
|
||||
|
||||
|
@ -52,14 +52,16 @@ async def async_setup_scanner(hass, config, async_see, discovery_info=None):
|
|||
)
|
||||
config_data = await hass.async_add_job(load_json, config_file)
|
||||
if config_data:
|
||||
client = Client(
|
||||
client = await async_login(
|
||||
config[CONF_USERNAME],
|
||||
config[CONF_PASSWORD],
|
||||
websession,
|
||||
client_uuid=config_data["client_uuid"],
|
||||
)
|
||||
else:
|
||||
client = Client(config[CONF_USERNAME], config[CONF_PASSWORD], websession)
|
||||
client = await async_login(
|
||||
config[CONF_USERNAME], config[CONF_PASSWORD], websession
|
||||
)
|
||||
|
||||
config_data = {"client_uuid": client.client_uuid}
|
||||
await hass.async_add_job(save_json, config_file, config_data)
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
"name": "Tile",
|
||||
"documentation": "https://www.home-assistant.io/integrations/tile",
|
||||
"requirements": [
|
||||
"pytile==2.0.6"
|
||||
"pytile==3.0.0"
|
||||
],
|
||||
"dependencies": [],
|
||||
"codeowners": [
|
||||
|
|
|
@ -1600,7 +1600,7 @@ python_opendata_transport==0.1.4
|
|||
pythonegardia==1.0.40
|
||||
|
||||
# homeassistant.components.tile
|
||||
pytile==2.0.6
|
||||
pytile==3.0.0
|
||||
|
||||
# homeassistant.components.touchline
|
||||
pytouchline==0.7
|
||||
|
|
Loading…
Reference in New Issue