Home Assistant Unofficial Reference 2024.12.1
homeassistant.components.tplink Namespace Reference

Namespaces

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Functions

str|None _device_id_is_mac_or_none (str mac, Iterable[str] device_ids)
 
str|None _mac_connection_or_none (dr.DeviceEntry device)
 
dict[str, Device] async_discover_devices (HomeAssistant hass)
 
bool async_migrate_entry (HomeAssistant hass, ConfigEntry config_entry)
 
bool async_setup (HomeAssistant hass, ConfigType config)
 
bool async_setup_entry (HomeAssistant hass, TPLinkConfigEntry entry)
 
None async_trigger_discovery (HomeAssistant hass, dict[str, Device] discovered_devices)
 
bool async_unload_entry (HomeAssistant hass, TPLinkConfigEntry entry)
 
ClientSession create_async_tplink_clientsession (HomeAssistant hass)
 
Credentials|None get_credentials (HomeAssistant hass)
 
str get_device_name (Device device, Device|None parent=None)
 
str legacy_device_id (Device device)
 
str mac_alias (str mac)
 
None set_credentials (HomeAssistant hass, str username, str password)
 

Variables

 _LOGGER = logging.getLogger(__name__)
 
 CONFIG_SCHEMA = cv.config_entry_only_config_schema(DOMAIN)
 
 DISCOVERY_INTERVAL = timedelta(minutes=15)
 
 TPLinkConfigEntry
 

Detailed Description

Component to embed TP-Link smart home devices.

Function Documentation

◆ _device_id_is_mac_or_none()

str | None homeassistant.components.tplink._device_id_is_mac_or_none ( str  mac,
Iterable[str]  device_ids 
)
private

Definition at line 306 of file __init__.py.

◆ _mac_connection_or_none()

str | None homeassistant.components.tplink._mac_connection_or_none ( dr.DeviceEntry  device)
private

Definition at line 295 of file __init__.py.

◆ async_discover_devices()

dict[str, Device] homeassistant.components.tplink.async_discover_devices ( HomeAssistant  hass)
Discover TPLink devices on configured network interfaces.

Definition at line 99 of file __init__.py.

◆ async_migrate_entry()

bool homeassistant.components.tplink.async_migrate_entry ( HomeAssistant  hass,
ConfigEntry  config_entry 
)
Migrate old entry.

Definition at line 317 of file __init__.py.

◆ async_setup()

bool homeassistant.components.tplink.async_setup ( HomeAssistant  hass,
ConfigType  config 
)
Set up the TP-Link component.

Definition at line 120 of file __init__.py.

◆ async_setup_entry()

bool homeassistant.components.tplink.async_setup_entry ( HomeAssistant  hass,
TPLinkConfigEntry  entry 
)
Set up TPLink from a config entry.

Definition at line 138 of file __init__.py.

◆ async_trigger_discovery()

None homeassistant.components.tplink.async_trigger_discovery ( HomeAssistant  hass,
dict[str, Device]  discovered_devices 
)
Trigger config flows for discovered devices.

Definition at line 79 of file __init__.py.

◆ async_unload_entry()

bool homeassistant.components.tplink.async_unload_entry ( HomeAssistant  hass,
TPLinkConfigEntry  entry 
)
Unload a config entry.

Definition at line 235 of file __init__.py.

◆ create_async_tplink_clientsession()

ClientSession homeassistant.components.tplink.create_async_tplink_clientsession ( HomeAssistant  hass)
Return aiohttp clientsession with cookie jar configured.

Definition at line 71 of file __init__.py.

◆ get_credentials()

Credentials | None homeassistant.components.tplink.get_credentials ( HomeAssistant  hass)
Retrieve the credentials from hass data.

Definition at line 273 of file __init__.py.

◆ get_device_name()

str homeassistant.components.tplink.get_device_name ( Device  device,
Device | None   parent = None 
)
Get a name for the device. alias can be none on some devices.

Definition at line 255 of file __init__.py.

◆ legacy_device_id()

str homeassistant.components.tplink.legacy_device_id ( Device  device)
Convert the device id so it matches what was used in the original version.

Definition at line 245 of file __init__.py.

◆ mac_alias()

str homeassistant.components.tplink.mac_alias ( str  mac)
Convert a MAC address to a short address for the UI.

Definition at line 290 of file __init__.py.

◆ set_credentials()

None homeassistant.components.tplink.set_credentials ( HomeAssistant  hass,
str  username,
str  password 
)
Save the credentials to HASS data.

Definition at line 282 of file __init__.py.

Variable Documentation

◆ _LOGGER

homeassistant.components.tplink._LOGGER = logging.getLogger(__name__)
private

Definition at line 68 of file __init__.py.

◆ CONFIG_SCHEMA

homeassistant.components.tplink.CONFIG_SCHEMA = cv.config_entry_only_config_schema(DOMAIN)

Definition at line 66 of file __init__.py.

◆ DISCOVERY_INTERVAL

homeassistant.components.tplink.DISCOVERY_INTERVAL = timedelta(minutes=15)

Definition at line 65 of file __init__.py.

◆ TPLinkConfigEntry

homeassistant.components.tplink.TPLinkConfigEntry

Definition at line 63 of file __init__.py.