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

Namespaces

 reproduce_state
 

Classes

class  InputSelect
 
class  InputSelectStorageCollection
 
class  InputSelectStore
 

Functions

dict[str, Any] _cv_input_select (dict[str, Any] cfg)
 
list[str] _remove_duplicates (list[str] options, str|None name)
 
Any _unique (Any options)
 
bool async_setup (HomeAssistant hass, ConfigType config)
 

Variables

 _LOGGER = logging.getLogger(__name__)
 
string CONF_INITIAL = "initial"
 
string CONF_OPTIONS = "options"
 
 CONFIG_SCHEMA
 
string DOMAIN = "input_select"
 
 RELOAD_SERVICE_SCHEMA = vol.Schema({})
 
string SERVICE_SET_OPTIONS = "set_options"
 
string STORAGE_KEY = DOMAIN
 
int STORAGE_VERSION = 1
 
int STORAGE_VERSION_MINOR = 2
 

Detailed Description

Support to select an option from a list.

Function Documentation

◆ _cv_input_select()

dict[str, Any] homeassistant.components.input_select._cv_input_select ( dict[str, Any]  cfg)
private
Configure validation helper for input select (voluptuous).

Definition at line 85 of file __init__.py.

◆ _remove_duplicates()

list[str] homeassistant.components.input_select._remove_duplicates ( list[str]  options,
str | None  name 
)
private
Remove duplicated options.

Definition at line 68 of file __init__.py.

◆ _unique()

Any homeassistant.components.input_select._unique ( Any  options)
private

Definition at line 51 of file __init__.py.

◆ async_setup()

bool homeassistant.components.input_select.async_setup ( HomeAssistant  hass,
ConfigType  config 
)
Set up an input select.

Definition at line 135 of file __init__.py.

Variable Documentation

◆ _LOGGER

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

Definition at line 38 of file __init__.py.

◆ CONF_INITIAL

string homeassistant.components.input_select.CONF_INITIAL = "initial"

Definition at line 42 of file __init__.py.

◆ CONF_OPTIONS

string homeassistant.components.input_select.CONF_OPTIONS = "options"

Definition at line 43 of file __init__.py.

◆ CONFIG_SCHEMA

homeassistant.components.input_select.CONFIG_SCHEMA
Initial value:
1 = vol.Schema(
2  {
3  DOMAIN: cv.schema_with_slug_keys(
4  vol.All(
5  {
6  vol.Optional(CONF_NAME): cv.string,
7  vol.Required(CONF_OPTIONS): vol.All(
8  cv.ensure_list, vol.Length(min=1), [cv.string]
9  ),
10  vol.Optional(CONF_INITIAL): cv.string,
11  vol.Optional(CONF_ICON): cv.icon,
12  },
13  _cv_input_select,
14  )
15  )
16  },
17  extra=vol.ALLOW_EXTRA,
18 )

Definition at line 97 of file __init__.py.

◆ DOMAIN

string homeassistant.components.input_select.DOMAIN = "input_select"

Definition at line 40 of file __init__.py.

◆ RELOAD_SERVICE_SCHEMA

homeassistant.components.input_select.RELOAD_SERVICE_SCHEMA = vol.Schema({})

Definition at line 115 of file __init__.py.

◆ SERVICE_SET_OPTIONS

string homeassistant.components.input_select.SERVICE_SET_OPTIONS = "set_options"

Definition at line 45 of file __init__.py.

◆ STORAGE_KEY

string homeassistant.components.input_select.STORAGE_KEY = DOMAIN

Definition at line 46 of file __init__.py.

◆ STORAGE_VERSION

int homeassistant.components.input_select.STORAGE_VERSION = 1

Definition at line 47 of file __init__.py.

◆ STORAGE_VERSION_MINOR

int homeassistant.components.input_select.STORAGE_VERSION_MINOR = 2

Definition at line 48 of file __init__.py.