Skip to content

Conversation

@bdraco
Copy link
Member

@bdraco bdraco commented Oct 11, 2025

Proposed change

This PR fixes an issue in the August integration where a generic ValueError was raised when the OAuth implementation was not available during startup (e.g., due to network issues). The error message "Implementation not available" was not user-friendly and prevented proper retry logic from executing.

The fix catches the ValueError from async_get_config_entry_implementation() and converts it to ConfigEntryNotReady with a descriptive message. This allows Home Assistant to automatically retry the setup later when the OAuth implementation becomes available.

ERROR (MainThread) [homeassistant.config_entries] Error setting up entry 89atl@koston.org for august
Traceback (most recent call last):
  ...
  File "/usr/src/homeassistant/homeassistant/helpers/config_entry_oauth2_flow.py", line 581, in async_get_config_entry_implementation
    raise ValueError("Implementation not available")
ValueError: Implementation not available

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New integration (thank you!)
  • New feature (which adds functionality to an existing integration)
  • Deprecation (breaking change to happen in the future)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Additional information

  • This PR fixes or closes issue: fixes #
  • This PR is related to issue:
  • Link to documentation pull request:
  • Link to developer documentation pull request:
  • Link to frontend pull request:

Checklist

  • I understand the code I am submitting and can explain how it works.
  • The code change is tested and works locally.
  • Local tests pass. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • I have followed the development checklist
  • I have followed the perfect PR recommendations
  • The code has been formatted using Ruff (ruff format homeassistant tests)
  • Tests have been added to verify that the new code works.
  • Any generated code has been carefully reviewed for correctness and compliance with project standards.

If user exposed functionality or configuration variables are added/changed:

If the code communicates with devices, web services, or third-party tools:

  • The manifest file has all fields filled out correctly.
    Updated and included derived files by running: python3 -m script.hassfest.
  • New or updated dependencies have been added to requirements_all.txt.
    Updated by running python3 -m script.gen_requirements_all.
  • For the updated dependencies - a link to the changelog, or at minimum a diff between library versions is added to the PR description.

To help with the load of incoming pull requests:

@bdraco bdraco added this to the 2025.10.3 milestone Oct 11, 2025
@bdraco bdraco marked this pull request as ready for review October 11, 2025 19:28
Copilot AI review requested due to automatic review settings October 11, 2025 19:28
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes an error handling issue in the August integration where a generic ValueError from unavailable OAuth implementation during startup was causing setup failures instead of proper retry behavior.

  • Wraps the OAuth implementation retrieval in a try-catch block
  • Converts ValueError to ConfigEntryNotReady with descriptive message for automatic retry
  • Adds test coverage for the OAuth implementation unavailable scenario

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
homeassistant/components/august/init.py Added error handling to convert ValueError to ConfigEntryNotReady when OAuth implementation is unavailable
tests/components/august/test_init.py Added test case to verify proper handling of unavailable OAuth implementation

@bdraco
Copy link
Member Author

bdraco commented Oct 12, 2025

Thanks

@bdraco bdraco merged commit c9d67d5 into dev Oct 12, 2025
34 checks passed
@bdraco bdraco deleted the august_oauth_not_available_startup branch October 12, 2025 19:16
davidrecordon pushed a commit to davidrecordon/home-assistant-core that referenced this pull request Oct 12, 2025
@github-actions github-actions bot locked and limited conversation to collaborators Oct 13, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants