Skip to content

Fix OptionsFlow crash on HA 2024.x+ (config_entry no longer settable in __init__) - #73

Open
schizek wants to merge 1 commit into
toreamun:masterfrom
schizek:fix/options-flow-ha-2025-compat
Open

Fix OptionsFlow crash on HA 2024.x+ (config_entry no longer settable in __init__)#73
schizek wants to merge 1 commit into
toreamun:masterfrom
schizek:fix/options-flow-ha-2025-compat

Conversation

@schizek

@schizek schizek commented May 12, 2026

Copy link
Copy Markdown

HA 2024.x made config_entry a read-only property on the OptionsFlow base class. This integration was still assigning to it in __init__, which caused a crash every time the options dialog was opened:

AttributeError: property 'config_entry' of 'VictorSmartKillOptionsFlowHandler' object has no setter

Changes:

  • config_flow.py: Removed VictorSmartKillOptionsFlowHandler.__init__ and updated async_get_options_flow to call the handler with no arguments. async_step_user now reads self.config_entry.options directly via the base class property.
  • __init__.py: Changed raise UpdateFailed(exception) to raise UpdateFailed(repr(exception)) so error messages in the log are never silently blank when the exception's __str__ returns an empty string.

Tested on HA 2025.1 with Python 3.14.

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.

2 participants