Home Assistant Unofficial Reference 2024.12.1
homeassistant.helpers.selector.ConstantSelector Class Reference
Inheritance diagram for homeassistant.helpers.selector.ConstantSelector:
[legend]
Collaboration diagram for homeassistant.helpers.selector.ConstantSelector:
[legend]

Public Member Functions

Any __call__ (self, Any data)
 
None __init__ (self, ConstantSelectorConfig config)
 

Static Public Attributes

 CONFIG_SCHEMA
 
string selector_type = "constant"
 

Detailed Description

Constant selector.

Definition at line 514 of file selector.py.

Constructor & Destructor Documentation

◆ __init__()

None homeassistant.helpers.selector.ConstantSelector.__init__ (   self,
ConstantSelectorConfig  config 
)
Instantiate a selector.

Definition at line 527 of file selector.py.

Member Function Documentation

◆ __call__()

Any homeassistant.helpers.selector.ConstantSelector.__call__ (   self,
Any  data 
)
Validate the passed selection.

Definition at line 531 of file selector.py.

Member Data Documentation

◆ CONFIG_SCHEMA

homeassistant.helpers.selector.ConstantSelector.CONFIG_SCHEMA
static
Initial value:
= vol.Schema(
{
vol.Optional("label"): str,
vol.Optional("translation_key"): cv.string,
vol.Required("value"): vol.Any(str, int, bool),
}
)

Definition at line 519 of file selector.py.

◆ selector_type

string homeassistant.helpers.selector.ConstantSelector.selector_type = "constant"
static

Definition at line 517 of file selector.py.


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