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

Public Member Functions

dict[str, float] __call__ (self, Any data)
 
None __init__ (self, MediaSelectorConfig|None config=None)
 

Static Public Attributes

 CONFIG_SCHEMA = vol.Schema({})
 
 DATA_SCHEMA
 
string selector_type = "media"
 

Detailed Description

Selector for media.

Definition at line 998 of file selector.py.

Constructor & Destructor Documentation

◆ __init__()

None homeassistant.helpers.selector.MediaSelector.__init__ (   self,
MediaSelectorConfig | None   config = None 
)
Instantiate a selector.

Definition at line 1016 of file selector.py.

Member Function Documentation

◆ __call__()

dict[str, float] homeassistant.helpers.selector.MediaSelector.__call__ (   self,
Any  data 
)
Validate the passed selection.

Definition at line 1020 of file selector.py.

Member Data Documentation

◆ CONFIG_SCHEMA

homeassistant.helpers.selector.MediaSelector.CONFIG_SCHEMA = vol.Schema({})
static

Definition at line 1003 of file selector.py.

◆ DATA_SCHEMA

homeassistant.helpers.selector.MediaSelector.DATA_SCHEMA
static
Initial value:
= vol.Schema(
{
# Although marked as optional in frontend, this field is required
vol.Required("entity_id"): cv.entity_id_or_uuid,
# Although marked as optional in frontend, this field is required
vol.Required("media_content_id"): str,
# Although marked as optional in frontend, this field is required
vol.Required("media_content_type"): str,
vol.Remove("metadata"): dict,
}
)

Definition at line 1004 of file selector.py.

◆ selector_type

string homeassistant.helpers.selector.MediaSelector.selector_type = "media"
static

Definition at line 1001 of file selector.py.


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