Home Assistant Unofficial Reference 2024.12.1
homeassistant.data_entry_flow.FlowHandler Class Reference
Inheritance diagram for homeassistant.data_entry_flow.FlowHandler:
[legend]
Collaboration diagram for homeassistant.data_entry_flow.FlowHandler:
[legend]

Public Member Functions

vol.Schema add_suggested_values_to_schema (self, vol.Schema data_schema, Mapping[str, Any]|None suggested_values)
 
_FlowResultT async_abort (self, *str reason, Mapping[str, str]|None description_placeholders=None)
 
None async_cancel_progress_task (self)
 
_FlowResultT async_create_entry (self, *str|None title=None, Mapping[str, Any] data, str|None description=None, Mapping[str, str]|None description_placeholders=None)
 
_FlowResultT async_external_step (self, *str|None step_id=None, str url, Mapping[str, str]|None description_placeholders=None)
 
_FlowResultT async_external_step_done (self, *str next_step_id)
 
asyncio.Task[Any]|None async_get_progress_task (self)
 
None async_remove (self)
 
None async_set_progress_task (self, asyncio.Task[Any] progress_task)
 
_FlowResultT async_show_form (self, *str|None step_id=None, vol.Schema|None data_schema=None, dict[str, str]|None errors=None, Mapping[str, str]|None description_placeholders=None, bool|None last_step=None, str|None preview=None)
 
_FlowResultT async_show_menu (self, *str|None step_id=None, Container[str] menu_options, Mapping[str, str]|None description_placeholders=None)
 
_FlowResultT async_show_progress (self, *str|None step_id=None, str progress_action, Mapping[str, str]|None description_placeholders=None, asyncio.Task[Any]|None progress_task=None)
 
_FlowResultT async_show_progress_done (self, *str next_step_id)
 
bool show_advanced_options (self)
 
str|None source (self)
 

Static Public Member Functions

None async_setup_preview (HomeAssistant hass)
 

Public Attributes

 deprecated_show_progress
 

Static Public Attributes

 Any
 
bool deprecated_show_progress = False
 
 HomeAssistant
 
string init_step = "init"
 
int MINOR_VERSION = 1
 
 None
 
 str
 
int VERSION = 1
 

Private Attributes

 __no_progress_task_reported
 
 __progress_task
 

Static Private Attributes

bool __no_progress_task_reported = False
 
 _FlowContextT
 
 _HandlerT
 

Detailed Description

Handle a data entry flow.

Definition at line 627 of file data_entry_flow.py.

Member Function Documentation

◆ add_suggested_values_to_schema()

vol.Schema homeassistant.data_entry_flow.FlowHandler.add_suggested_values_to_schema (   self,
vol.Schema  data_schema,
Mapping[str, Any] | None   suggested_values 
)
Make a copy of the schema, populated with suggested values.

For each schema marker matching items in `suggested_values`,
the `suggested_value` will be set. The existing `suggested_value` will
be left untouched if there is no matching item.

Definition at line 667 of file data_entry_flow.py.

◆ async_abort()

_FlowResultT homeassistant.data_entry_flow.FlowHandler.async_abort (   self,
*str  reason,
Mapping[str, str] | None   description_placeholders = None 
)
Abort the flow.

Reimplemented in homeassistant.config_entries.ConfigFlow.

Definition at line 752 of file data_entry_flow.py.

◆ async_cancel_progress_task()

None homeassistant.data_entry_flow.FlowHandler.async_cancel_progress_task (   self)
Cancel in progress task.

Definition at line 887 of file data_entry_flow.py.

◆ async_create_entry()

_FlowResultT homeassistant.data_entry_flow.FlowHandler.async_create_entry (   self,
*str | None   title = None,
Mapping[str, Any data,
str | None   description = None,
Mapping[str, str] | None   description_placeholders = None 
)
Finish flow.

Definition at line 729 of file data_entry_flow.py.

◆ async_external_step()

_FlowResultT homeassistant.data_entry_flow.FlowHandler.async_external_step (   self,
*str | None   step_id = None,
str  url,
Mapping[str, str] | None   description_placeholders = None 
)
Return the definition of an external step for the user to take.

The step_id parameter is deprecated and will be removed in a future release.

Definition at line 768 of file data_entry_flow.py.

◆ async_external_step_done()

_FlowResultT homeassistant.data_entry_flow.FlowHandler.async_external_step_done (   self,
*str  next_step_id 
)
Return the definition of an external step for the user to take.

Definition at line 791 of file data_entry_flow.py.

◆ async_get_progress_task()

asyncio.Task[Any] | None homeassistant.data_entry_flow.FlowHandler.async_get_progress_task (   self)
Get in progress task.

Definition at line 894 of file data_entry_flow.py.

◆ async_remove()

◆ async_set_progress_task()

None homeassistant.data_entry_flow.FlowHandler.async_set_progress_task (   self,
asyncio.Task[Any progress_task 
)
Set in progress task.

Definition at line 899 of file data_entry_flow.py.

◆ async_setup_preview()

◆ async_show_form()

_FlowResultT homeassistant.data_entry_flow.FlowHandler.async_show_form (   self,
*str | None   step_id = None,
vol.Schema | None   data_schema = None,
dict[str, str] | None   errors = None,
Mapping[str, str] | None   description_placeholders = None,
bool | None   last_step = None,
str | None   preview = None 
)
Return the definition of a form to gather user input.

The step_id parameter is deprecated and will be removed in a future release.

Reimplemented in homeassistant.config_entries.ConfigFlow.

Definition at line 700 of file data_entry_flow.py.

◆ async_show_menu()

_FlowResultT homeassistant.data_entry_flow.FlowHandler.async_show_menu (   self,
*str | None   step_id = None,
Container[str menu_options,
Mapping[str, str] | None   description_placeholders = None 
)
Show a navigation menu to the user.

Options dict maps step_id => i18n label
The step_id parameter is deprecated and will be removed in a future release.

Definition at line 854 of file data_entry_flow.py.

◆ async_show_progress()

_FlowResultT homeassistant.data_entry_flow.FlowHandler.async_show_progress (   self,
*str | None   step_id = None,
str  progress_action,
Mapping[str, str] | None   description_placeholders = None,
asyncio.Task[Any] | None   progress_task = None 
)
Show a progress message to the user, without user input allowed.

The step_id parameter is deprecated and will be removed in a future release.

Definition at line 801 of file data_entry_flow.py.

◆ async_show_progress_done()

_FlowResultT homeassistant.data_entry_flow.FlowHandler.async_show_progress_done (   self,
*str  next_step_id 
)
Mark the progress done.

Definition at line 844 of file data_entry_flow.py.

◆ show_advanced_options()

bool homeassistant.data_entry_flow.FlowHandler.show_advanced_options (   self)
If we should show advanced options.

Definition at line 663 of file data_entry_flow.py.

◆ source()

str | None homeassistant.data_entry_flow.FlowHandler.source (   self)
Source that initialized the flow.

Definition at line 658 of file data_entry_flow.py.

Member Data Documentation

◆ __no_progress_task_reported [1/2]

bool homeassistant.data_entry_flow.FlowHandler.__no_progress_task_reported = False
staticprivate

Definition at line 654 of file data_entry_flow.py.

◆ __no_progress_task_reported [2/2]

homeassistant.data_entry_flow.FlowHandler.__no_progress_task_reported
private

Definition at line 814 of file data_entry_flow.py.

◆ __progress_task

homeassistant.data_entry_flow.FlowHandler.__progress_task
private

Definition at line 891 of file data_entry_flow.py.

◆ _FlowContextT

homeassistant.data_entry_flow.FlowHandler._FlowContextT
staticprivate

Definition at line 641 of file data_entry_flow.py.

◆ _HandlerT

homeassistant.data_entry_flow.FlowHandler._HandlerT
staticprivate

Definition at line 639 of file data_entry_flow.py.

◆ Any

homeassistant.data_entry_flow.FlowHandler.Any
static

Definition at line 647 of file data_entry_flow.py.

◆ deprecated_show_progress [1/2]

bool homeassistant.data_entry_flow.FlowHandler.deprecated_show_progress = False
static

Definition at line 655 of file data_entry_flow.py.

◆ deprecated_show_progress [2/2]

homeassistant.data_entry_flow.FlowHandler.deprecated_show_progress

Definition at line 829 of file data_entry_flow.py.

◆ HomeAssistant

homeassistant.data_entry_flow.FlowHandler.HomeAssistant
static

Definition at line 638 of file data_entry_flow.py.

◆ init_step

string homeassistant.data_entry_flow.FlowHandler.init_step = "init"
static

Definition at line 644 of file data_entry_flow.py.

◆ MINOR_VERSION

int homeassistant.data_entry_flow.FlowHandler.MINOR_VERSION = 1
static

Definition at line 651 of file data_entry_flow.py.

◆ None

homeassistant.data_entry_flow.FlowHandler.None
static

Definition at line 633 of file data_entry_flow.py.

◆ str

homeassistant.data_entry_flow.FlowHandler.str
static

Definition at line 637 of file data_entry_flow.py.

◆ VERSION

int homeassistant.data_entry_flow.FlowHandler.VERSION = 1
static

Definition at line 650 of file data_entry_flow.py.


The documentation for this class was generated from the following file: