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

Public Member Functions

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

Static Public Attributes

 CONFIG_SCHEMA
 
string selector_type = "duration"
 

Detailed Description

Selector for a duration.

Definition at line 733 of file selector.py.

Constructor & Destructor Documentation

◆ __init__()

None homeassistant.helpers.selector.DurationSelector.__init__ (   self,
DurationSelectorConfig | None   config = None 
)
Instantiate a selector.

Definition at line 750 of file selector.py.

Member Function Documentation

◆ __call__()

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

Definition at line 754 of file selector.py.

Member Data Documentation

◆ CONFIG_SCHEMA

homeassistant.helpers.selector.DurationSelector.CONFIG_SCHEMA
static
Initial value:
= vol.Schema(
{
# Enable day field in frontend. A selection with `days` set is allowed
# even if `enable_day` is not set
vol.Optional("enable_day"): cv.boolean,
# Enable millisecond field in frontend.
vol.Optional("enable_millisecond"): cv.boolean,
# Allow negative durations. Will default to False in HA Core 2025.6.0.
vol.Optional("allow_negative"): cv.boolean,
}
)

Definition at line 738 of file selector.py.

◆ selector_type

string homeassistant.helpers.selector.DurationSelector.selector_type = "duration"
static

Definition at line 736 of file selector.py.


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