Home Assistant Unofficial Reference 2024.12.1
homeassistant.components.template.select Namespace Reference

Classes

class  TemplateSelect
 
class  TriggerSelectEntity
 

Functions

list[TemplateSelect_async_create_entities (HomeAssistant hass, list[dict[str, Any]] definitions, str|None unique_id_prefix)
 
None async_setup_entry (HomeAssistant hass, ConfigEntry config_entry, AddEntitiesCallback async_add_entities)
 
None async_setup_platform (HomeAssistant hass, ConfigType config, AddEntitiesCallback async_add_entities, DiscoveryInfoType|None discovery_info=None)
 

Variables

 _LOGGER = logging.getLogger(__name__)
 
string CONF_OPTIONS = "options"
 
string CONF_SELECT_OPTION = "select_option"
 
string DEFAULT_NAME = "Template Select"
 
bool DEFAULT_OPTIMISTIC = False
 
 SELECT_CONFIG_SCHEMA
 
tuple SELECT_SCHEMA
 

Detailed Description

Support for selects which integrates with other components.

Function Documentation

◆ _async_create_entities()

list[TemplateSelect] homeassistant.components.template.select._async_create_entities ( HomeAssistant  hass,
list[dict[str, Any]]  definitions,
str | None   unique_id_prefix 
)
private
Create the Template select.

Definition at line 75 of file select.py.

◆ async_setup_entry()

None homeassistant.components.template.select.async_setup_entry ( HomeAssistant  hass,
ConfigEntry  config_entry,
AddEntitiesCallback  async_add_entities 
)
Initialize config entry.

Definition at line 115 of file select.py.

◆ async_setup_platform()

None homeassistant.components.template.select.async_setup_platform ( HomeAssistant  hass,
ConfigType  config,
AddEntitiesCallback  async_add_entities,
DiscoveryInfoType | None   discovery_info = None 
)
Set up the template select.

Definition at line 88 of file select.py.

Variable Documentation

◆ _LOGGER

homeassistant.components.template.select._LOGGER = logging.getLogger(__name__)
private

Definition at line 40 of file select.py.

◆ CONF_OPTIONS

string homeassistant.components.template.select.CONF_OPTIONS = "options"

Definition at line 42 of file select.py.

◆ CONF_SELECT_OPTION

string homeassistant.components.template.select.CONF_SELECT_OPTION = "select_option"

Definition at line 43 of file select.py.

◆ DEFAULT_NAME

string homeassistant.components.template.select.DEFAULT_NAME = "Template Select"

Definition at line 45 of file select.py.

◆ DEFAULT_OPTIMISTIC

bool homeassistant.components.template.select.DEFAULT_OPTIMISTIC = False

Definition at line 46 of file select.py.

◆ SELECT_CONFIG_SCHEMA

homeassistant.components.template.select.SELECT_CONFIG_SCHEMA
Initial value:
1 = vol.Schema(
2  {
3  vol.Required(CONF_NAME): cv.template,
4  vol.Required(CONF_STATE): cv.template,
5  vol.Required(CONF_OPTIONS): cv.template,
6  vol.Optional(CONF_SELECT_OPTION): cv.SCRIPT_SCHEMA,
7  vol.Optional(CONF_DEVICE_ID): selector.DeviceSelector(),
8  }
9 )

Definition at line 64 of file select.py.

◆ SELECT_SCHEMA

tuple homeassistant.components.template.select.SELECT_SCHEMA
Initial value:
1 = (
2  vol.Schema(
3  {
4  vol.Optional(CONF_NAME, default=DEFAULT_NAME): cv.template,
5  vol.Required(CONF_STATE): cv.template,
6  vol.Required(CONF_SELECT_OPTION): cv.SCRIPT_SCHEMA,
7  vol.Required(ATTR_OPTIONS): cv.template,
8  vol.Optional(CONF_OPTIMISTIC, default=DEFAULT_OPTIMISTIC): cv.boolean,
9  vol.Optional(CONF_UNIQUE_ID): cv.string,
10  }
11  )
12  .extend(TEMPLATE_ENTITY_AVAILABILITY_SCHEMA.schema)
13  .extend(TEMPLATE_ENTITY_ICON_SCHEMA.schema)
14 )

Definition at line 48 of file select.py.