From d0b93eaaeb6dd8a00907c7db30bc422119c925ff Mon Sep 17 00:00:00 2001 From: tronikos Date: Sun, 5 Jan 2025 03:49:09 -0800 Subject: [PATCH] Update Handling logging of a retry section to match implementation (#2521) --- docs/integration_setup_failures.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/integration_setup_failures.md b/docs/integration_setup_failures.md index 7e5213cb..687a1708 100644 --- a/docs/integration_setup_failures.md +++ b/docs/integration_setup_failures.md @@ -28,8 +28,7 @@ If your integration supports discovery, Home Assistant will automatically retry #### Handling logging of a retry -Pass the error message to `ConfigEntryNotReady` as the first argument. Home Assistant will log the retry once with a log level of -`warning`, and subsequent retries are logged at `debug` level. The error message will also be propagated to the UI and shown on the integrations page. Suppose you do not set a message when raising `ConfigEntryNotReady`; in that case, Home Assistant will try to extract the reason from the exception that is the cause of `ConfigEntryNotReady` if it was propagated from another exception. +Pass the error message to `ConfigEntryNotReady` as the first argument. Home Assistant will log at `debug` level. The error message will also be propagated to the UI and shown on the integrations page. Suppose you do not set a message when raising `ConfigEntryNotReady`; in that case, Home Assistant will try to extract the reason from the exception that is the cause of `ConfigEntryNotReady` if it was propagated from another exception. The integration should not log any non-debug messages about the retry, and should instead rely on the logic built-in to `ConfigEntryNotReady` to avoid spamming the logs.