diff --git a/homeassistant/components/tile/device_tracker.py b/homeassistant/components/tile/device_tracker.py index e8ed5b06d27..924fa913d30 100644 --- a/homeassistant/components/tile/device_tracker.py +++ b/homeassistant/components/tile/device_tracker.py @@ -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) diff --git a/homeassistant/components/tile/manifest.json b/homeassistant/components/tile/manifest.json index 5e40c89369a..0dd0b70ef52 100644 --- a/homeassistant/components/tile/manifest.json +++ b/homeassistant/components/tile/manifest.json @@ -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": [ diff --git a/requirements_all.txt b/requirements_all.txt index 8f22d229f56..cbe4a93f812 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -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