Skip to content
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

Fix: Added fix for rate_limit_delay attribute error, resolved async wait #218

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

paimonsoror
Copy link

This should resolve the errors with the rate_limit_delay function, as well as subsequent async related errors that happen afterwards.

Resolves: #216

for component in PLATFORMS:
await hass.config_entries.async_forward_entry_setup(entry, component)
# Resolve deprecation in latest HA by moving to setups vs setup
await hass.config_entries.async_forward_entry_setups(entry, PLATFORMS)
Copy link

Choose a reason for hiding this comment

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

good catch!

@@ -99,7 +99,7 @@ def _unload_component_entry(
"""Unload an entry for a specific component."""
success = False
try:
success = hass.config_entries.async_forward_entry_unload(entry, component)
success = await hass.config_entries.async_forward_entry_unload(entry, component)
Copy link

Choose a reason for hiding this comment

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

this will fail, the function needs to be defined as async

Copy link

Choose a reason for hiding this comment

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

I tried the changes manually and they seem to work but this PR making the line 96 function definition async.

Copy link
Author

Choose a reason for hiding this comment

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

@gabosom odd, I could have sworn I tried that and still got errors. So did you set the def as a sync and keep the await?

I can give that another test and update the PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

AttributeError did you mean 'rate_limit_reset' after restart
2 participants