Classes to help gather user submissions.

exception homeassistant.data_entry_flow.AbortFlow(reason: str, description_placeholders: dict | None = None)[source]

Exception to indicate a flow needs to be aborted.

exception homeassistant.data_entry_flow.FlowError[source]

Error while configuring an account.

class homeassistant.data_entry_flow.FlowHandler[source]

Handle the configuration flow of a component.

async_abort(*, reason: str, description_placeholders: dict | None = None) → FlowResult[source]

Abort the config flow.

async_create_entry(*, title: str, data: Mapping[str, Any], description: str | None = None, description_placeholders: dict | None = None) → FlowResult[source]

Finish config flow and create a config entry.

async_external_step(*, step_id: str, url: str, description_placeholders: dict | None = None) → FlowResult[source]

Return the definition of an external step for the user to take.

async_external_step_done(*, next_step_id: str) → homeassistant.data_entry_flow.FlowResult[source]

Return the definition of an external step for the user to take.

async_show_form(*, step_id: str, data_schema: vol.Schema = None, errors: dict[str, str] | None = None, description_placeholders: dict[str, Any] | None = None, last_step: bool | None = None) → FlowResult[source]

Return the definition of a form to gather user input.

async_show_progress(*, step_id: str, progress_action: str, description_placeholders: dict | None = None) → FlowResult[source]

Show a progress message to the user, without user input allowed.

async_show_progress_done(*, next_step_id: str) → homeassistant.data_entry_flow.FlowResult[source]

Mark the progress done.

property show_advanced_options

If we should show advanced options.

property source

Source that initialized the flow.

class homeassistant.data_entry_flow.FlowManager(hass: homeassistant.core.HomeAssistant)[source]

Manage all the flows that are in progress.

async_abort(flow_id: str) → None[source]

Abort a flow.

async async_configure(flow_id: str, user_input: dict | None = None) → FlowResult[source]

Continue a configuration flow.

abstract async async_create_flow(handler_key: Any, *, context: dict[str, Any] | None = None, data: dict[str, Any] | None = None) → FlowHandler[source]

Create a flow for specified handler.

Handler key is the domain of the component that we want to set up.

abstract async async_finish_flow(flow: homeassistant.data_entry_flow.FlowHandler, result: homeassistant.data_entry_flow.FlowResult) → homeassistant.data_entry_flow.FlowResult[source]

Finish a config flow and add an entry.

async async_init(handler: str, *, context: dict[str, Any] | None = None, data: Any = None) → FlowResult[source]

Start a configuration flow.

async async_post_init(flow: homeassistant.data_entry_flow.FlowHandler, result: homeassistant.data_entry_flow.FlowResult) → None[source]

Entry has finished executing its first step asynchronously.

async_progress(include_uninitialized: bool = False) → list[FlowResult][source]

Return the flows in progress.

async async_shutdown() → None[source]

Cancel any initializing flows.

async async_wait_init_flow_finish(handler: str) → None[source]

Wait till all flows in progress are initialized.

class homeassistant.data_entry_flow.FlowResult[source]

Typed result dict.

exception homeassistant.data_entry_flow.UnknownFlow[source]

Unknown flow specified.

exception homeassistant.data_entry_flow.UnknownHandler[source]

Unknown handler specified.

exception homeassistant.data_entry_flow.UnknownStep[source]

Unknown step specified.