mirror of
https://github.com/home-assistant/core.git
synced 2025-07-17 02:07:09 +00:00
Stop Tile setup on invalid auth (#45683)
This commit is contained in:
parent
c7db2c35b7
commit
4f3b10d661
@ -4,7 +4,7 @@ from datetime import timedelta
|
|||||||
from functools import partial
|
from functools import partial
|
||||||
|
|
||||||
from pytile import async_login
|
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.const import CONF_PASSWORD, CONF_USERNAME
|
||||||
from homeassistant.exceptions import ConfigEntryNotReady
|
from homeassistant.exceptions import ConfigEntryNotReady
|
||||||
@ -43,6 +43,9 @@ async def async_setup_entry(hass, entry):
|
|||||||
session=websession,
|
session=websession,
|
||||||
)
|
)
|
||||||
hass.data[DOMAIN][DATA_TILE][entry.entry_id] = await client.async_get_tiles()
|
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:
|
except TileError as err:
|
||||||
raise ConfigEntryNotReady("Error during integration setup") from err
|
raise ConfigEntryNotReady("Error during integration setup") from err
|
||||||
|
|
||||||
|
@ -3,6 +3,6 @@
|
|||||||
"name": "Tile",
|
"name": "Tile",
|
||||||
"config_flow": true,
|
"config_flow": true,
|
||||||
"documentation": "https://www.home-assistant.io/integrations/tile",
|
"documentation": "https://www.home-assistant.io/integrations/tile",
|
||||||
"requirements": ["pytile==5.1.0"],
|
"requirements": ["pytile==5.2.0"],
|
||||||
"codeowners": ["@bachya"]
|
"codeowners": ["@bachya"]
|
||||||
}
|
}
|
||||||
|
@ -1849,7 +1849,7 @@ python_opendata_transport==0.2.1
|
|||||||
pythonegardia==1.0.40
|
pythonegardia==1.0.40
|
||||||
|
|
||||||
# homeassistant.components.tile
|
# homeassistant.components.tile
|
||||||
pytile==5.1.0
|
pytile==5.2.0
|
||||||
|
|
||||||
# homeassistant.components.touchline
|
# homeassistant.components.touchline
|
||||||
pytouchline==0.7
|
pytouchline==0.7
|
||||||
|
@ -929,7 +929,7 @@ python-velbus==2.1.2
|
|||||||
python_awair==0.2.1
|
python_awair==0.2.1
|
||||||
|
|
||||||
# homeassistant.components.tile
|
# homeassistant.components.tile
|
||||||
pytile==5.1.0
|
pytile==5.2.0
|
||||||
|
|
||||||
# homeassistant.components.traccar
|
# homeassistant.components.traccar
|
||||||
pytraccar==0.9.0
|
pytraccar==0.9.0
|
||||||
|
Loading…
x
Reference in New Issue
Block a user