Stop Tile setup on invalid auth (#45683)
This commit is contained in:
parent
c7db2c35b7
commit
4f3b10d661
4 changed files with 7 additions and 4 deletions
|
@ -4,7 +4,7 @@ from datetime import timedelta
|
|||
from functools import partial
|
||||
|
||||
from pytile import async_login
|
||||
from pytile.errors import SessionExpiredError, TileError
|
||||
from pytile.errors import InvalidAuthError, SessionExpiredError, TileError
|
||||
|
||||
from homeassistant.const import CONF_PASSWORD, CONF_USERNAME
|
||||
from homeassistant.exceptions import ConfigEntryNotReady
|
||||
|
@ -43,6 +43,9 @@ async def async_setup_entry(hass, entry):
|
|||
session=websession,
|
||||
)
|
||||
hass.data[DOMAIN][DATA_TILE][entry.entry_id] = await client.async_get_tiles()
|
||||
except InvalidAuthError:
|
||||
LOGGER.error("Invalid credentials provided")
|
||||
return False
|
||||
except TileError as err:
|
||||
raise ConfigEntryNotReady("Error during integration setup") from err
|
||||
|
||||
|
|
|
@ -3,6 +3,6 @@
|
|||
"name": "Tile",
|
||||
"config_flow": true,
|
||||
"documentation": "https://www.home-assistant.io/integrations/tile",
|
||||
"requirements": ["pytile==5.1.0"],
|
||||
"requirements": ["pytile==5.2.0"],
|
||||
"codeowners": ["@bachya"]
|
||||
}
|
||||
|
|
|
@ -1849,7 +1849,7 @@ python_opendata_transport==0.2.1
|
|||
pythonegardia==1.0.40
|
||||
|
||||
# homeassistant.components.tile
|
||||
pytile==5.1.0
|
||||
pytile==5.2.0
|
||||
|
||||
# homeassistant.components.touchline
|
||||
pytouchline==0.7
|
||||
|
|
|
@ -929,7 +929,7 @@ python-velbus==2.1.2
|
|||
python_awair==0.2.1
|
||||
|
||||
# homeassistant.components.tile
|
||||
pytile==5.1.0
|
||||
pytile==5.2.0
|
||||
|
||||
# homeassistant.components.traccar
|
||||
pytraccar==0.9.0
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue