-
-
Notifications
You must be signed in to change notification settings - Fork 31.6k
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
Make elevenlabs recoverable #134094
base: dev
Are you sure you want to change the base?
Make elevenlabs recoverable #134094
Conversation
Hey there @sorgfresser, mind taking a look at this pull request as it has been labeled with an integration ( Code owner commandsCode owners of
|
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.
Thanks a bunch! Tested locally and works as intended.
The coverage is not happy though. I'm happy to add a test
I PR'ed them in your repo joostlek#4 |
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.
Looks like init
isn't tested anyhow.
"""Test entry setup without any exceptions.""" | ||
mock_entry.add_to_hass(hass) | ||
await hass.config_entries.async_setup(mock_entry.entry_id) | ||
assert mock_entry.state == ConfigEntryState.LOADED |
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.
Include the unloading here as well to extend the coverage
"""Test entry setup without any exceptions.""" | ||
mock_entry.add_to_hass(hass) | ||
await hass.config_entries.async_setup(mock_entry.entry_id) | ||
assert mock_entry.state == ConfigEntryState.LOADED |
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.
assert mock_entry.state == ConfigEntryState.LOADED | |
assert mock_entry.state == ConfigEntryState.LOADED | |
# Unload | |
await hass.config_entries.async_unload(mock_entry.entry_id) | |
assert mock_entry.state == ConfigEntryState.NOT_LOADED |
Proposed change
Make elevenlabs recoverable
So last night the power went out in my building, and it got restored an hour later. The main internet switch did not restore right away. This of course causes HA to still try to connect to the internet, but it can't resolve DNS.
After this, the integration did not reload anymore. This PR is making sure we catch this exception so we can retry again later
Type of change
Additional information
Checklist
ruff format homeassistant tests
)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest
.requirements_all.txt
.Updated by running
python3 -m script.gen_requirements_all
.To help with the load of incoming pull requests: