Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 14 additions & 6 deletions homeassistant/config_entries.py
Original file line number Diff line number Diff line change
Expand Up @@ -259,12 +259,20 @@ async def async_setup(
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 wait_time < 80:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe just log a warning the first time, and let the rest be debug messages?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the suggestion.
Should I word it

"Config entry '%s' for %s integration not ready yet. Retrying in background"

or something similar ?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good. What do you think @balloob?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the mean time that we wait for Paulus check, I'll updated the code.

_LOGGER.warning(
"Config entry '%s' for %s integration not ready yet. Retrying in %d seconds",
self.title,
self.domain,
wait_time,
)
elif wait_time == 80:
_LOGGER.warning(
"Config entry '%s' for %s integration not ready yet. Retrying in %d seconds. This is the last logged message.",
self.title,
self.domain,
wait_time,
)

async def setup_again(now: Any) -> None:
"""Run setup again."""
Expand Down