1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-24 21:06:19 +00:00

Allow to sort options in select selector (#97680)

Co-authored-by: Franck Nijhof <git@frenck.dev>
This commit is contained in:
Paul Bottein
2023-08-03 21:49:22 +02:00
committed by GitHub
parent d33955c467
commit 83af2f5b8b
3 changed files with 8 additions and 0 deletions

View File

@@ -988,6 +988,7 @@ class SelectSelectorConfig(TypedDict, total=False):
custom_value: bool
mode: SelectSelectorMode
translation_key: str
sort: bool
@SELECTORS.register("select")
@@ -1005,6 +1006,7 @@ class SelectSelector(Selector[SelectSelectorConfig]):
vol.Coerce(SelectSelectorMode), lambda val: val.value
),
vol.Optional("translation_key"): cv.string,
vol.Optional("sort", default=False): cv.boolean,
}
)