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

Public Member Functions

None __init__ (self, HomeAssistant hass)
 
None async_abort (self, str flow_id)
 
_FlowResultT async_configure (self, str flow_id, dict|None user_input=None)
 
FlowHandler[_FlowContextT, _FlowResultT, _HandlerTasync_create_flow (self, _HandlerT handler_key, *_FlowContextT|None context=None, dict[str, Any]|None data=None)
 
_FlowResultT async_finish_flow (self, FlowHandler[_FlowContextT, _FlowResultT, _HandlerT] flow, _FlowResultT result)
 
_FlowResultT async_get (self, str flow_id)
 
_FlowResultT async_init (self, _HandlerT handler, *_FlowContextT|None context=None, Any data=None)
 
None async_post_init (self, FlowHandler[_FlowContextT, _FlowResultT, _HandlerT] flow, _FlowResultT result)
 
list[_FlowResultTasync_progress (self, bool include_uninitialized=False)
 
list[_FlowResultTasync_progress_by_handler (self, _HandlerT handler, bool include_uninitialized=False, dict[str, Any]|None match_context=None)
 
list[_FlowResultTasync_progress_by_init_data_type (self, type init_data_type, Callable[[Any], bool] matcher, bool include_uninitialized=False)
 

Public Attributes

 hass
 

Private Member Functions

None _async_add_flow_progress (self, FlowHandler[_FlowContextT, _FlowResultT, _HandlerT] flow)
 
_FlowResultT _async_configure (self, str flow_id, dict|None user_input=None)
 
list[_FlowResultT_async_flow_handler_to_flow_result (self, Iterable[FlowHandler[_FlowContextT, _FlowResultT, _HandlerT]] flows, bool include_uninitialized)
 
_FlowResultT _async_handle_step (self, FlowHandler[_FlowContextT, _FlowResultT, _HandlerT] flow, str step_id, dict|BaseServiceInfo|None user_input)
 
list[FlowHandler[_FlowContextT, _FlowResultT, _HandlerT]] _async_progress_by_handler (self, _HandlerT handler, dict[str, Any]|None match_context)
 
None _async_remove_flow_from_index (self, FlowHandler[_FlowContextT, _FlowResultT, _HandlerT] flow)
 
None _async_remove_flow_progress (self, str flow_id)
 
None _async_setup_preview (self, FlowHandler[_FlowContextT, _FlowResultT, _HandlerT] flow)
 
None _raise_if_step_does_not_exist (self, FlowHandler[_FlowContextT, _FlowResultT, _HandlerT] flow, str step_id)
 

Detailed Description

Manage all the flows that are in progress.

Definition at line 202 of file data_entry_flow.py.

Constructor & Destructor Documentation

◆ __init__()

None homeassistant.data_entry_flow.FlowManager.__init__ (   self,
HomeAssistant  hass 
)
Initialize the flow manager.

Definition at line 207 of file data_entry_flow.py.

Member Function Documentation

◆ _async_add_flow_progress()

None homeassistant.data_entry_flow.FlowManager._async_add_flow_progress (   self,
FlowHandler[_FlowContextT, _FlowResultT, _HandlerT]   flow 
)
private
Add a flow to in progress.

Definition at line 470 of file data_entry_flow.py.

◆ _async_configure()

_FlowResultT homeassistant.data_entry_flow.FlowManager._async_configure (   self,
str  flow_id,
dict | None   user_input = None 
)
private
Continue a data entry flow.

Definition at line 373 of file data_entry_flow.py.

◆ _async_flow_handler_to_flow_result()

list[_FlowResultT] homeassistant.data_entry_flow.FlowManager._async_flow_handler_to_flow_result (   self,
Iterable[FlowHandler[_FlowContextT, _FlowResultT, _HandlerT]]  flows,
bool  include_uninitialized 
)
private
Convert a list of FlowHandler to a partial FlowResult that can be serialized.

Definition at line 603 of file data_entry_flow.py.

◆ _async_handle_step()

_FlowResultT homeassistant.data_entry_flow.FlowManager._async_handle_step (   self,
FlowHandler[_FlowContextT, _FlowResultT, _HandlerT flow,
str  step_id,
dict | BaseServiceInfo | None  user_input 
)
private
Handle a step of a flow.

Definition at line 506 of file data_entry_flow.py.

◆ _async_progress_by_handler()

list[FlowHandler[_FlowContextT, _FlowResultT, _HandlerT]] homeassistant.data_entry_flow.FlowManager._async_progress_by_handler (   self,
_HandlerT  handler,
dict[str, Any] | None   match_context 
)
private
Return the flows in progress by handler.

If match_context is specified, only return flows with a context that
is a superset of match_context.

Definition at line 305 of file data_entry_flow.py.

◆ _async_remove_flow_from_index()

None homeassistant.data_entry_flow.FlowManager._async_remove_flow_from_index (   self,
FlowHandler[_FlowContextT, _FlowResultT, _HandlerT]   flow 
)
private
Remove a flow from in progress.

Definition at line 480 of file data_entry_flow.py.

◆ _async_remove_flow_progress()

None homeassistant.data_entry_flow.FlowManager._async_remove_flow_progress (   self,
str  flow_id 
)
private
Remove a flow from in progress.

Definition at line 495 of file data_entry_flow.py.

◆ _async_setup_preview()

None homeassistant.data_entry_flow.FlowManager._async_setup_preview (   self,
FlowHandler[_FlowContextT, _FlowResultT, _HandlerT]   flow 
)
private
Set up preview for a flow handler.

Definition at line 594 of file data_entry_flow.py.

◆ _raise_if_step_does_not_exist()

None homeassistant.data_entry_flow.FlowManager._raise_if_step_does_not_exist (   self,
FlowHandler[_FlowContextT, _FlowResultT, _HandlerT flow,
str   step_id 
)
private
Raise if the step does not exist.

Definition at line 582 of file data_entry_flow.py.

◆ async_abort()

None homeassistant.data_entry_flow.FlowManager.async_abort (   self,
str  flow_id 
)
Abort a flow.

Definition at line 465 of file data_entry_flow.py.

◆ async_configure()

_FlowResultT homeassistant.data_entry_flow.FlowManager.async_configure (   self,
str  flow_id,
dict | None   user_input = None 
)
Continue a data entry flow.

Definition at line 349 of file data_entry_flow.py.

◆ async_create_flow()

FlowHandler[_FlowContextT, _FlowResultT, _HandlerT] homeassistant.data_entry_flow.FlowManager.async_create_flow (   self,
_HandlerT  handler_key,
*_FlowContextT | None   context = None,
dict[str, Any] | None   data = None 
)
Create a flow for specified handler.

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

Definition at line 225 of file data_entry_flow.py.

◆ async_finish_flow()

_FlowResultT homeassistant.data_entry_flow.FlowManager.async_finish_flow (   self,
FlowHandler[_FlowContextT, _FlowResultT, _HandlerT flow,
_FlowResultT  result 
)
Finish a data entry flow.

This method is called when a flow step returns FlowResultType.ABORT or
FlowResultType.CREATE_ENTRY.

Definition at line 238 of file data_entry_flow.py.

◆ async_get()

_FlowResultT homeassistant.data_entry_flow.FlowManager.async_get (   self,
str  flow_id 
)
Return a flow in progress as a partial FlowResult.

Definition at line 257 of file data_entry_flow.py.

◆ async_init()

_FlowResultT homeassistant.data_entry_flow.FlowManager.async_init (   self,
_HandlerT  handler,
*_FlowContextT | None   context = None,
Any   data = None 
)
Start a data entry flow.

Definition at line 322 of file data_entry_flow.py.

◆ async_post_init()

None homeassistant.data_entry_flow.FlowManager.async_post_init (   self,
FlowHandler[_FlowContextT, _FlowResultT, _HandlerT flow,
_FlowResultT  result 
)
Entry has finished executing its first step asynchronously.

Definition at line 249 of file data_entry_flow.py.

◆ async_progress()

list[_FlowResultT] homeassistant.data_entry_flow.FlowManager.async_progress (   self,
bool   include_uninitialized = False 
)
Return the flows in progress as a partial FlowResult.

Definition at line 264 of file data_entry_flow.py.

◆ async_progress_by_handler()

list[_FlowResultT] homeassistant.data_entry_flow.FlowManager.async_progress_by_handler (   self,
_HandlerT  handler,
bool   include_uninitialized = False,
dict[str, Any] | None   match_context = None 
)
Return the flows in progress by handler as a partial FlowResult.

If match_context is specified, only return flows with a context that
is a superset of match_context.

Definition at line 271 of file data_entry_flow.py.

◆ async_progress_by_init_data_type()

list[_FlowResultT] homeassistant.data_entry_flow.FlowManager.async_progress_by_init_data_type (   self,
type  init_data_type,
Callable[[Any], bool]  matcher,
bool   include_uninitialized = False 
)
Return flows in progress init matching by data type as a partial FlowResult.

Definition at line 288 of file data_entry_flow.py.

Member Data Documentation

◆ hass

homeassistant.data_entry_flow.FlowManager.hass

Definition at line 212 of file data_entry_flow.py.


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