Home Assistant Unofficial Reference 2024.12.1
homeassistant.components.tplink.config_flow.TPLinkConfigFlow Class Reference
Inheritance diagram for homeassistant.components.tplink.config_flow.TPLinkConfigFlow:
[legend]
Collaboration diagram for homeassistant.components.tplink.config_flow.TPLinkConfigFlow:
[legend]

Public Member Functions

None __init__ (self)
 
ConfigFlowResult async_step_dhcp (self, dhcp.DhcpServiceInfo discovery_info)
 
ConfigFlowResult async_step_discovery_auth_confirm (self, dict[str, Any]|None user_input=None)
 
ConfigFlowResult async_step_discovery_confirm (self, dict[str, Any]|None user_input=None)
 
ConfigFlowResult async_step_integration_discovery (self, DiscoveryInfoType discovery_info)
 
ConfigFlowResult async_step_pick_device (self, dict[str, Any]|None user_input=None)
 
ConfigFlowResult async_step_reauth (self, Mapping[str, Any] entry_data)
 
ConfigFlowResult async_step_reauth_confirm (self, dict[str, Any]|None user_input=None)
 
ConfigFlowResult async_step_user (self, dict[str, Any]|None user_input=None)
 
ConfigFlowResult async_step_user_auth_confirm (self, dict[str, Any]|None user_input=None)
 
bool is_matching (self, Self other_flow)
 
- Public Member Functions inherited from homeassistant.config_entries.ConfigFlow
None __init_subclass__ (cls, *str|None domain=None, **Any kwargs)
 
ConfigFlowResult async_abort (self, *str reason, Mapping[str, str]|None description_placeholders=None)
 
ConfigFlowResult async_create_entry (self, *str title, Mapping[str, Any] data, str|None description=None, Mapping[str, str]|None description_placeholders=None, Mapping[str, Any]|None options=None)
 
ConfigEntry|None async_set_unique_id (self, str|None unique_id=None, *bool raise_on_progress=True)
 
ConfigFlowResult 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)
 
ConfigFlowResult async_step_bluetooth (self, BluetoothServiceInfoBleak discovery_info)
 
ConfigFlowResult async_step_dhcp (self, DhcpServiceInfo discovery_info)
 
ConfigFlowResult async_step_discovery (self, DiscoveryInfoType discovery_info)
 
ConfigFlowResult async_step_hassio (self, HassioServiceInfo discovery_info)
 
ConfigFlowResult async_step_homekit (self, ZeroconfServiceInfo discovery_info)
 
ConfigFlowResult async_step_ignore (self, dict[str, Any] user_input)
 
ConfigFlowResult async_step_mqtt (self, MqttServiceInfo discovery_info)
 
ConfigFlowResult async_step_ssdp (self, SsdpServiceInfo discovery_info)
 
ConfigFlowResult async_step_usb (self, UsbServiceInfo discovery_info)
 
ConfigFlowResult async_step_zeroconf (self, ZeroconfServiceInfo discovery_info)
 
bool async_supports_options_flow (cls, ConfigEntry config_entry)
 
ConfigFlowResult async_update_reload_and_abort (self, ConfigEntry entry, *str|None|UndefinedType unique_id=UNDEFINED, str|UndefinedType title=UNDEFINED, Mapping[str, Any]|UndefinedType data=UNDEFINED, Mapping[str, Any]|UndefinedType data_updates=UNDEFINED, Mapping[str, Any]|UndefinedType options=UNDEFINED, str|UndefinedType reason=UNDEFINED, bool reload_even_if_entry_is_unchanged=True)
 
str|None unique_id (self)
 
- Public Member Functions inherited from homeassistant.data_entry_flow.FlowHandler
vol.Schema add_suggested_values_to_schema (self, vol.Schema data_schema, Mapping[str, Any]|None suggested_values)
 
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_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)
 

Public Attributes

 host
 
 port
 
 source
 
- Public Attributes inherited from homeassistant.config_entries.ConfigFlow
 source
 
- Public Attributes inherited from homeassistant.data_entry_flow.FlowHandler
 deprecated_show_progress
 

Static Public Attributes

 MINOR_VERSION = CONF_CONFIG_ENTRY_MINOR_VERSION
 
 None
 
int VERSION = 1
 
- Static Public Attributes inherited from homeassistant.data_entry_flow.FlowHandler
 Any
 
bool deprecated_show_progress = False
 
 HomeAssistant
 
string init_step = "init"
 
int MINOR_VERSION = 1
 
 None
 
 str
 
int VERSION = 1
 

Private Member Functions

ConfigFlowResult _async_create_entry_from_device (self, Device device)
 
ConfigFlowResult _async_handle_discovery (self, str host, str formatted_mac, Device|None device=None)
 
dict[str, str_async_make_placeholders_from_discovery (self)
 
None _async_reload_requires_auth_entries (self)
 
Device _async_try_connect (self, Device discovered_device, Credentials|None credentials)
 
Device|None _async_try_connect_all (self, str host, Credentials|None credentials, bool raise_on_progress, *int|None port=None)
 
Device|None _async_try_discover_and_update (self, str host, Credentials|None credentials, bool raise_on_progress, bool raise_on_timeout, *int|None port=None)
 
dict|None _get_config_updates (self, ConfigEntry entry, str host, Device|None device)
 
ConfigFlowResult|None _update_config_if_entry_in_setup_error (self, ConfigEntry entry, str host, Device|None device)
 

Static Private Member Functions

tuple[str, int|None_async_get_host_port (str host_str)
 

Private Attributes

 _discovered_device
 
 _discovered_devices
 

Additional Inherited Members

- Static Public Member Functions inherited from homeassistant.config_entries.ConfigFlow
OptionsFlow async_get_options_flow (ConfigEntry config_entry)
 
- Static Public Member Functions inherited from homeassistant.data_entry_flow.FlowHandler
None async_setup_preview (HomeAssistant hass)
 

Detailed Description

Handle a config flow for tplink.

Definition at line 66 of file config_flow.py.

Constructor & Destructor Documentation

◆ __init__()

None homeassistant.components.tplink.config_flow.TPLinkConfigFlow.__init__ (   self)
Initialize the config flow.

Definition at line 75 of file config_flow.py.

Member Function Documentation

◆ _async_create_entry_from_device()

ConfigFlowResult homeassistant.components.tplink.config_flow.TPLinkConfigFlow._async_create_entry_from_device (   self,
Device  device 
)
private
Create a config entry from a smart device.

Definition at line 447 of file config_flow.py.

◆ _async_get_host_port()

tuple[str, int | None] homeassistant.components.tplink.config_flow.TPLinkConfigFlow._async_get_host_port ( str  host_str)
staticprivate
Parse the host string for host and port.

Definition at line 266 of file config_flow.py.

◆ _async_handle_discovery()

ConfigFlowResult homeassistant.components.tplink.config_flow.TPLinkConfigFlow._async_handle_discovery (   self,
str  host,
str  formatted_mac,
Device | None   device = None 
)
private
Handle any discovery.

Definition at line 147 of file config_flow.py.

◆ _async_make_placeholders_from_discovery()

dict[str, str] homeassistant.components.tplink.config_flow.TPLinkConfigFlow._async_make_placeholders_from_discovery (   self)
private
Make placeholders for the discovery steps.

Definition at line 240 of file config_flow.py.

◆ _async_reload_requires_auth_entries()

None homeassistant.components.tplink.config_flow.TPLinkConfigFlow._async_reload_requires_auth_entries (   self)
private
Reload any in progress config flow that now have credentials.

Definition at line 427 of file config_flow.py.

◆ _async_try_connect()

Device homeassistant.components.tplink.config_flow.TPLinkConfigFlow._async_try_connect (   self,
Device  discovered_device,
Credentials | None  credentials 
)
private
Try to connect.

Definition at line 543 of file config_flow.py.

◆ _async_try_connect_all()

Device | None homeassistant.components.tplink.config_flow.TPLinkConfigFlow._async_try_connect_all (   self,
str  host,
Credentials | None  credentials,
bool  raise_on_progress,
*int | None   port = None 
)
private
Try to connect to the device speculatively.

The connection parameters aren't known but discovery has failed so try
to connect with tcp.

Definition at line 470 of file config_flow.py.

◆ _async_try_discover_and_update()

Device | None homeassistant.components.tplink.config_flow.TPLinkConfigFlow._async_try_discover_and_update (   self,
str  host,
Credentials | None  credentials,
bool  raise_on_progress,
bool  raise_on_timeout,
*int | None   port = None 
)
private
Try to discover the device and call update.

Will try to connect directly if discovery fails.

Definition at line 506 of file config_flow.py.

◆ _get_config_updates()

dict | None homeassistant.components.tplink.config_flow.TPLinkConfigFlow._get_config_updates (   self,
ConfigEntry  entry,
str  host,
Device | None   device 
)
private
Return updates if the host or device config has changed.

Definition at line 99 of file config_flow.py.

◆ _update_config_if_entry_in_setup_error()

ConfigFlowResult | None homeassistant.components.tplink.config_flow.TPLinkConfigFlow._update_config_if_entry_in_setup_error (   self,
ConfigEntry  entry,
str  host,
Device | None   device 
)
private
If discovery encounters a device that is in SETUP_ERROR or SETUP_RETRY update the device config.

Definition at line 130 of file config_flow.py.

◆ async_step_dhcp()

ConfigFlowResult homeassistant.components.tplink.config_flow.TPLinkConfigFlow.async_step_dhcp (   self,
dhcp.DhcpServiceInfo   discovery_info 
)
Handle discovery via dhcp.

Definition at line 80 of file config_flow.py.

◆ async_step_discovery_auth_confirm()

ConfigFlowResult homeassistant.components.tplink.config_flow.TPLinkConfigFlow.async_step_discovery_auth_confirm (   self,
dict[str, Any] | None   user_input = None 
)
Dialog that informs the user that auth is required.

Definition at line 189 of file config_flow.py.

◆ async_step_discovery_confirm()

ConfigFlowResult homeassistant.components.tplink.config_flow.TPLinkConfigFlow.async_step_discovery_confirm (   self,
dict[str, Any] | None   user_input = None 
)
Confirm discovery.

Definition at line 250 of file config_flow.py.

◆ async_step_integration_discovery()

ConfigFlowResult homeassistant.components.tplink.config_flow.TPLinkConfigFlow.async_step_integration_discovery (   self,
DiscoveryInfoType   discovery_info 
)
Handle integration discovery.

Reimplemented from homeassistant.config_entries.ConfigFlow.

Definition at line 88 of file config_flow.py.

◆ async_step_pick_device()

ConfigFlowResult homeassistant.components.tplink.config_flow.TPLinkConfigFlow.async_step_pick_device (   self,
dict[str, Any] | None   user_input = None 
)
Handle the step to pick discovered device.

Definition at line 387 of file config_flow.py.

◆ async_step_reauth()

ConfigFlowResult homeassistant.components.tplink.config_flow.TPLinkConfigFlow.async_step_reauth (   self,
Mapping[str, Any]   entry_data 
)
Start the reauthentication flow if the device needs updated credentials.

Definition at line 565 of file config_flow.py.

◆ async_step_reauth_confirm()

ConfigFlowResult homeassistant.components.tplink.config_flow.TPLinkConfigFlow.async_step_reauth_confirm (   self,
dict[str, Any] | None   user_input = None 
)
Dialog that informs the user that reauth is required.

Definition at line 571 of file config_flow.py.

◆ async_step_user()

ConfigFlowResult homeassistant.components.tplink.config_flow.TPLinkConfigFlow.async_step_user (   self,
dict[str, Any] | None   user_input = None 
)
Handle the initial step.

Reimplemented from homeassistant.config_entries.ConfigFlow.

Definition at line 285 of file config_flow.py.

◆ async_step_user_auth_confirm()

ConfigFlowResult homeassistant.components.tplink.config_flow.TPLinkConfigFlow.async_step_user_auth_confirm (   self,
dict[str, Any] | None   user_input = None 
)
Dialog that informs the user that auth is required.

Definition at line 336 of file config_flow.py.

◆ is_matching()

bool homeassistant.components.tplink.config_flow.TPLinkConfigFlow.is_matching (   self,
Self  other_flow 
)
Return True if other_flow is matching this flow.

Reimplemented from homeassistant.config_entries.ConfigFlow.

Definition at line 185 of file config_flow.py.

Member Data Documentation

◆ _discovered_device

homeassistant.components.tplink.config_flow.TPLinkConfigFlow._discovered_device
private

Definition at line 169 of file config_flow.py.

◆ _discovered_devices

homeassistant.components.tplink.config_flow.TPLinkConfigFlow._discovered_devices
private

Definition at line 411 of file config_flow.py.

◆ host

homeassistant.components.tplink.config_flow.TPLinkConfigFlow.host

Definition at line 162 of file config_flow.py.

◆ MINOR_VERSION

homeassistant.components.tplink.config_flow.TPLinkConfigFlow.MINOR_VERSION = CONF_CONFIG_ENTRY_MINOR_VERSION
static

Definition at line 70 of file config_flow.py.

◆ None

homeassistant.components.tplink.config_flow.TPLinkConfigFlow.None
static

Definition at line 72 of file config_flow.py.

◆ port

homeassistant.components.tplink.config_flow.TPLinkConfigFlow.port

Definition at line 300 of file config_flow.py.

◆ source

homeassistant.components.tplink.config_flow.TPLinkConfigFlow.source

Definition at line 431 of file config_flow.py.

◆ VERSION

int homeassistant.components.tplink.config_flow.TPLinkConfigFlow.VERSION = 1
static

Definition at line 69 of file config_flow.py.


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