Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 9 additions & 6 deletions custom_components/termoalert/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,15 +94,18 @@ def async_get_options_flow(
config_entry: config_entries.ConfigEntry,
) -> config_entries.OptionsFlow:
"""Get the options flow for this handler."""
return TermoAlertOptionsFlowHandler(config_entry)
return TermoAlertOptionsFlowHandler()


class TermoAlertOptionsFlowHandler(config_entries.OptionsFlow):
"""Handle options for TermoAlert București."""

def __init__(self, config_entry: config_entries.ConfigEntry) -> None:
"""Initialize options flow."""
self.config_entry = config_entry
"""Handle options for TermoAlert București.

Note: no __init__ override here. Since Home Assistant 2025.12,
OptionsFlow.config_entry is a read-only property populated
automatically by the framework; assigning to it manually (the old
boilerplate pattern) raises:
AttributeError: property 'config_entry' of '...' object has no setter
"""

async def async_step_init(
self, user_input: dict[str, Any] | None = None
Expand Down