mirror of
https://github.com/home-assistant/core.git
synced 2025-07-17 10:17:09 +00:00
Fix issues with new tile 2020 devices (#28133)
* Update meteoalertapi to version 0.1.6 * Fix tile to supporting 2020 tile devices
This commit is contained in:
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):
|
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 Client
|
from pytile import async_login
|
||||||
|
|
||||||
websession = aiohttp_client.async_get_clientsession(hass)
|
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)
|
config_data = await hass.async_add_job(load_json, config_file)
|
||||||
if config_data:
|
if config_data:
|
||||||
client = Client(
|
client = await async_login(
|
||||||
config[CONF_USERNAME],
|
config[CONF_USERNAME],
|
||||||
config[CONF_PASSWORD],
|
config[CONF_PASSWORD],
|
||||||
websession,
|
websession,
|
||||||
client_uuid=config_data["client_uuid"],
|
client_uuid=config_data["client_uuid"],
|
||||||
)
|
)
|
||||||
else:
|
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}
|
config_data = {"client_uuid": client.client_uuid}
|
||||||
await hass.async_add_job(save_json, config_file, config_data)
|
await hass.async_add_job(save_json, config_file, config_data)
|
||||||
|
@ -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==2.0.6"
|
"pytile==3.0.0"
|
||||||
],
|
],
|
||||||
"dependencies": [],
|
"dependencies": [],
|
||||||
"codeowners": [
|
"codeowners": [
|
||||||
|
@ -1600,7 +1600,7 @@ python_opendata_transport==0.1.4
|
|||||||
pythonegardia==1.0.40
|
pythonegardia==1.0.40
|
||||||
|
|
||||||
# homeassistant.components.tile
|
# homeassistant.components.tile
|
||||||
pytile==2.0.6
|
pytile==3.0.0
|
||||||
|
|
||||||
# homeassistant.components.touchline
|
# homeassistant.components.touchline
|
||||||
pytouchline==0.7
|
pytouchline==0.7
|
||||||
|
Loading…
x
Reference in New Issue
Block a user