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

Namespaces

 const
 

Functions

bool async_setup (HomeAssistant hass, ConfigType config)
 
def get_plug_devices (hass, entity_configs)
 
def get_system_unique_id (er.RegistryEntry entity)
 
def validate_configs (hass, entity_configs)
 

Variables

 _LOGGER = logging.getLogger(__name__)
 
 CONFIG_ENTITY_SCHEMA
 
 CONFIG_SCHEMA
 

Detailed Description

Support for local power state reporting of entities by emulating TP-Link Kasa smart plugs.

Function Documentation

◆ async_setup()

bool homeassistant.components.emulated_kasa.async_setup ( HomeAssistant  hass,
ConfigType  config 
)
Set up the emulated_kasa component.

Definition at line 52 of file __init__.py.

◆ get_plug_devices()

def homeassistant.components.emulated_kasa.get_plug_devices (   hass,
  entity_configs 
)
Produce list of plug devices from config entities.

Definition at line 115 of file __init__.py.

◆ get_system_unique_id()

def homeassistant.components.emulated_kasa.get_system_unique_id ( er.RegistryEntry  entity)
Determine the system wide unique_id for an entity.

Definition at line 110 of file __init__.py.

◆ validate_configs()

def homeassistant.components.emulated_kasa.validate_configs (   hass,
  entity_configs 
)
Validate that entities exist and ensure templates are ready to use.

Definition at line 81 of file __init__.py.

Variable Documentation

◆ _LOGGER

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

Definition at line 25 of file __init__.py.

◆ CONFIG_ENTITY_SCHEMA

homeassistant.components.emulated_kasa.CONFIG_ENTITY_SCHEMA
Initial value:
1 = vol.Schema(
2  {
3  vol.Optional(CONF_NAME): cv.string,
4  vol.Optional(CONF_POWER): vol.Any(
5  vol.Coerce(float),
6  cv.template,
7  ),
8  vol.Optional(CONF_POWER_ENTITY): cv.string,
9  }
10 )

Definition at line 27 of file __init__.py.

◆ CONFIG_SCHEMA

homeassistant.components.emulated_kasa.CONFIG_SCHEMA
Initial value:
1 = vol.Schema(
2  {
3  DOMAIN: vol.Schema(
4  {
5  vol.Required(CONF_ENTITIES): vol.Schema(
6  {cv.entity_id: CONFIG_ENTITY_SCHEMA}
7  ),
8  }
9  )
10  },
11  extra=vol.ALLOW_EXTRA,
12 )

Definition at line 38 of file __init__.py.