Skip to content

Fix deprecated config_entry assignment in OptionsFlow#25

Open
ayn wants to merge 4 commits intotsunglung:masterfrom
ayn:fix/config-entry
Open

Fix deprecated config_entry assignment in OptionsFlow#25
ayn wants to merge 4 commits intotsunglung:masterfrom
ayn:fix/config-entry

Conversation

@ayn
Copy link
Copy Markdown
Contributor

@ayn ayn commented Jan 7, 2026

Title

Fix deprecated config_entry assignment in OptionsFlow

Description

This PR updates the OptionsFlow implementation to comply with the current Home Assistant API.

What changed

  • Removed passing config_entry into OpenCWBOptionsFlow during initialization
  • Dropped the custom __init__ method and manual self.config_entry assignment
  • Rely on Home Assistant’s built-in handling of config_entry for OptionsFlow

Why

Recent Home Assistant versions deprecate manually assigning config_entry in OptionsFlow. The framework now injects it automatically. This change eliminates deprecation warnings and aligns the integration with current best practices.

Impact

  • No functional changes to the options UI
  • Forward-compatible with newer Home Assistant releases
  • Cleaner and more idiomatic OptionsFlow implementation

CI

  • Updated GitHub Actions to use Python 3.10
  • Fixes CI failure caused by Python 3.8 being removed from GitHub-hosted runners

omegaatt36 added a commit to omegaatt36/OpenCWB that referenced this pull request Mar 29, 2026
HA 2024.11+ auto-injects config_entry into OptionsFlow instances.
Remove manual __init__ and stop passing config_entry to the constructor
to eliminate deprecation warnings on modern HA versions.

Follows upstream PR tsunglung#25.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.

1 participant