-
-
Notifications
You must be signed in to change notification settings - Fork 32k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
EntityComponent to retry platforms that are not ready yet #8209
Conversation
@balloob, thanks for your PR! By analyzing the history of the files in this pull request, we identified @pvizeli, @fabaff and @partofthething to be potential reviewers. |
I think we should back off to some longer interval (5 to 30 minutes), then retry perpetually. Especially if this is going to be opt-in by platforms. The big use-case is platforms that aren't available 24/7, and require a restart to pick up. If hass is only retrying for a short window after start up, this doesn't really fix it. The big concern is that as soon as you have more than one platform that has to be online during start up, it becomes trickier to find a window where everything is online and you can successfully start up. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should try it out and maby with new expirence we see points to make it better. But it Looks greate 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree. Especially since this is opt-in it doesn't need to be perfect right away. We can tweak it later as necessary and from what we learn.
…tant#8209) * Add PlatformNotReady Exception * lint * Remove cap, adjust algorithm
Description:
This adds support for the entity component to retry setup of platforms that are not ready yet.
PlatformNotReady
that platforms can raise to opt-in for the built-in retry logic.EntityComponent catches this exception and will automatically retry the platform setup up to 10 times. Time between retries is 5, 10, 15, 20, 25 and 30 seconds after each retry after that.Related issue (if applicable): fixes #4937
Checklist:
If the code does not interact with devices:
tox
run successfully. Your PR cannot be merged unless tests pass