homeassistant.data_entry_flow

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) → dict[str, Any][source]

Abort the config flow.

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

Finish config flow and create a config entry.

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

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

async_external_step_done(*, next_step_id: str) → dict[str, Any][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 | None = None, description_placeholders: dict | None = None) → dict[str, Any][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) → dict[str, Any][source]

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

async_show_progress_done(*, next_step_id: str) → dict[str, Any][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) → Any[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: FlowHandler, result: dict[str, Any]) → dict[str, Any][source]

Finish a config flow and add an entry.

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

Start a configuration flow.

async async_post_init(flow: FlowHandler, result: dict[str, Any]) → None[source]

Entry has finished executing its first step asynchronously.

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

Return the flows in progress.

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

Wait till all flows in progress are initialized.

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.