Use CountrySelector in Workday (#101879)
This commit is contained in:
parent
e5f37050a9
commit
b6d8211c6c
2 changed files with 5 additions and 10 deletions
|
@ -16,6 +16,8 @@ from homeassistant.core import callback
|
|||
from homeassistant.data_entry_flow import AbortFlow, FlowResult
|
||||
from homeassistant.exceptions import HomeAssistantError
|
||||
from homeassistant.helpers.selector import (
|
||||
CountrySelector,
|
||||
CountrySelectorConfig,
|
||||
NumberSelector,
|
||||
NumberSelectorConfig,
|
||||
NumberSelectorMode,
|
||||
|
@ -113,11 +115,9 @@ def validate_custom_dates(user_input: dict[str, Any]) -> None:
|
|||
DATA_SCHEMA_SETUP = vol.Schema(
|
||||
{
|
||||
vol.Required(CONF_NAME, default=DEFAULT_NAME): TextSelector(),
|
||||
vol.Optional(CONF_COUNTRY): SelectSelector(
|
||||
SelectSelectorConfig(
|
||||
options=list(list_supported_countries()),
|
||||
mode=SelectSelectorMode.DROPDOWN,
|
||||
translation_key=CONF_COUNTRY,
|
||||
vol.Optional(CONF_COUNTRY): CountrySelector(
|
||||
CountrySelectorConfig(
|
||||
countries=list(list_supported_countries()),
|
||||
)
|
||||
),
|
||||
}
|
||||
|
|
|
@ -69,11 +69,6 @@
|
|||
}
|
||||
},
|
||||
"selector": {
|
||||
"country": {
|
||||
"options": {
|
||||
"none": "No country"
|
||||
}
|
||||
},
|
||||
"province": {
|
||||
"options": {
|
||||
"none": "No subdivision"
|
||||
|
|
Loading…
Add table
Reference in a new issue