mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 21:27:38 +00:00
Ease understanding of integration failures (#134475)
Co-authored-by: Shay Levy <levyshay1@gmail.com> Co-authored-by: David Bonnes <zxdavb@bonnes.me>
This commit is contained in:
parent
72caf9d5a2
commit
3118831557
@ -426,11 +426,12 @@ class EntityPlatform:
|
|||||||
type(exc).__name__,
|
type(exc).__name__,
|
||||||
)
|
)
|
||||||
return False
|
return False
|
||||||
except Exception:
|
except Exception as exc:
|
||||||
logger.exception(
|
logger.exception(
|
||||||
"Error while setting up %s platform for %s",
|
"Error while setting up %s platform for %s: %s",
|
||||||
self.platform_name,
|
self.platform_name,
|
||||||
self.domain,
|
self.domain,
|
||||||
|
exc, # noqa: TRY401
|
||||||
)
|
)
|
||||||
return False
|
return False
|
||||||
else:
|
else:
|
||||||
|
@ -425,8 +425,8 @@ async def _async_setup_component(
|
|||||||
)
|
)
|
||||||
return False
|
return False
|
||||||
# pylint: disable-next=broad-except
|
# pylint: disable-next=broad-except
|
||||||
except (asyncio.CancelledError, SystemExit, Exception):
|
except (asyncio.CancelledError, SystemExit, Exception) as exc:
|
||||||
_LOGGER.exception("Error during setup of component %s", domain)
|
_LOGGER.exception("Error during setup of component %s: %s", domain, exc) # noqa: TRY401
|
||||||
async_notify_setup_error(hass, domain, integration.documentation)
|
async_notify_setup_error(hass, domain, integration.documentation)
|
||||||
return False
|
return False
|
||||||
finally:
|
finally:
|
||||||
|
@ -25,7 +25,7 @@ SETUP_FAILED_ANTICIPATED = (
|
|||||||
SETUP_FAILED_UNEXPECTED = (
|
SETUP_FAILED_UNEXPECTED = (
|
||||||
"homeassistant.setup",
|
"homeassistant.setup",
|
||||||
logging.ERROR,
|
logging.ERROR,
|
||||||
"Error during setup of component evohome",
|
"Error during setup of component evohome: ",
|
||||||
)
|
)
|
||||||
AUTHENTICATION_FAILED = (
|
AUTHENTICATION_FAILED = (
|
||||||
"homeassistant.components.evohome.helpers",
|
"homeassistant.components.evohome.helpers",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user