diff --git a/docs/config_entries_options_flow_handler.md b/docs/config_entries_options_flow_handler.md index a1ab4e8f..db951b02 100644 --- a/docs/config_entries_options_flow_handler.md +++ b/docs/config_entries_options_flow_handler.md @@ -14,7 +14,10 @@ For an integration to support options it needs to have an `async_get_options_flo ```python @staticmethod @callback -def async_get_options_flow(config_entry): +def async_get_options_flow( + config_entry: config_entries.ConfigEntry, +) -> config_entries.OptionsFlow: + """Create the options flow.""" return OptionsFlowHandler(config_entry) ``` @@ -24,11 +27,13 @@ The Flow handler works just like the config flow handler, except that the first ```python class OptionsFlowHandler(config_entries.OptionsFlow): - def __init__(self, config_entry): + def __init__(self, config_entry: config_entries.ConfigEntry) -> None: """Initialize options flow.""" self.config_entry = config_entry - async def async_step_init(self, user_input=None): + async def async_step_init( + self, user_input: dict[str, Any] | None = None + ) -> FlowResult: """Manage the options.""" if user_input is not None: return self.async_create_entry(title="", data=user_input)