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

Public Member Functions

str __call__ (self, Any data)
 
None __init__ (self, StateSelectorConfig config)
 

Static Public Attributes

 CONFIG_SCHEMA
 
string selector_type = "state"
 

Detailed Description

Selector for an entity state.

Definition at line 1213 of file selector.py.

Constructor & Destructor Documentation

◆ __init__()

None homeassistant.helpers.selector.StateSelector.__init__ (   self,
StateSelectorConfig  config 
)
Instantiate a selector.

Definition at line 1229 of file selector.py.

Member Function Documentation

◆ __call__()

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

Definition at line 1233 of file selector.py.

Member Data Documentation

◆ CONFIG_SCHEMA

homeassistant.helpers.selector.StateSelector.CONFIG_SCHEMA
static
Initial value:
= vol.Schema(
{
vol.Required("entity_id"): cv.entity_id,
# The attribute to filter on, is currently deliberately not
# configurable/exposed. We are considering separating state
# selectors into two types: one for state and one for attribute.
# Limiting the public use, prevents breaking changes in the future.
# vol.Optional("attribute"): str,
}
)

Definition at line 1218 of file selector.py.

◆ selector_type

string homeassistant.helpers.selector.StateSelector.selector_type = "state"
static

Definition at line 1216 of file selector.py.


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