mirror of
https://github.com/home-assistant/core.git
synced 2025-12-23 20:39:01 +00:00
Add enable_millisecond to duration selector (#122821)
* Add enable_milliseconds to duration selector. * One more test
This commit is contained in:
@@ -725,6 +725,7 @@ class DurationSelectorConfig(TypedDict, total=False):
|
||||
"""Class to represent a duration selector config."""
|
||||
|
||||
enable_day: bool
|
||||
enable_millisecond: bool
|
||||
allow_negative: bool
|
||||
|
||||
|
||||
@@ -739,6 +740,8 @@ class DurationSelector(Selector[DurationSelectorConfig]):
|
||||
# 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,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user