1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-24 12:59:34 +00:00

Raise ConfigEntryAuthFailed during setup or coordinator update to start reauth (#48962)

This commit is contained in:
J. Nick Koston
2021-04-09 19:41:29 -10:00
committed by GitHub
parent 7cc857a298
commit 4cd7f9bd8b
51 changed files with 534 additions and 517 deletions

View File

@@ -98,14 +98,26 @@ class ConditionErrorContainer(ConditionError):
yield from item.output(indent)
class PlatformNotReady(HomeAssistantError):
class IntegrationError(HomeAssistantError):
"""Base class for platform and config entry exceptions."""
def __str__(self) -> str:
"""Return a human readable error."""
return super().__str__() or str(self.__cause__)
class PlatformNotReady(IntegrationError):
"""Error to indicate that platform is not ready."""
class ConfigEntryNotReady(HomeAssistantError):
class ConfigEntryNotReady(IntegrationError):
"""Error to indicate that config entry is not ready."""
class ConfigEntryAuthFailed(IntegrationError):
"""Error to indicate that config entry could not authenticate."""
class InvalidStateError(HomeAssistantError):
"""When an invalid state is encountered."""