From dddf28b13899d29c70b9fa202a9e5c840621a2b1 Mon Sep 17 00:00:00 2001 From: Simone Chemelli Date: Tue, 2 Mar 2021 21:50:28 +0100 Subject: [PATCH] Limit log spam by ConfigEntryNotReady (#47201) --- homeassistant/config_entries.py | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/homeassistant/config_entries.py b/homeassistant/config_entries.py index b54300faaa77..b0ec71be9cf3 100644 --- a/homeassistant/config_entries.py +++ b/homeassistant/config_entries.py @@ -257,12 +257,19 @@ class ConfigEntry: self.state = ENTRY_STATE_SETUP_RETRY wait_time = 2 ** min(tries, 4) * 5 tries += 1 - _LOGGER.warning( - "Config entry '%s' for %s integration not ready yet. Retrying in %d seconds", - self.title, - self.domain, - wait_time, - ) + if tries == 1: + _LOGGER.warning( + "Config entry '%s' for %s integration not ready yet. Retrying in background", + self.title, + self.domain, + ) + else: + _LOGGER.debug( + "Config entry '%s' for %s integration not ready yet. Retrying in %d seconds", + self.title, + self.domain, + wait_time, + ) async def setup_again(now: Any) -> None: """Run setup again."""