Make Workday UI setup nicer (#105407)

This commit is contained in:
G Johansson 2023-12-11 14:06:29 +01:00 committed by GitHub
parent cedac41407
commit c0314cd05c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 13 deletions

View File

@ -155,6 +155,14 @@ DATA_SCHEMA_SETUP = vol.Schema(
DATA_SCHEMA_OPT = vol.Schema(
{
vol.Optional(CONF_WORKDAYS, default=DEFAULT_WORKDAYS): SelectSelector(
SelectSelectorConfig(
options=ALLOWED_DAYS,
multiple=True,
mode=SelectSelectorMode.DROPDOWN,
translation_key="days",
)
),
vol.Optional(CONF_EXCLUDES, default=DEFAULT_EXCLUDES): SelectSelector(
SelectSelectorConfig(
options=ALLOWED_DAYS,
@ -166,14 +174,6 @@ DATA_SCHEMA_OPT = vol.Schema(
vol.Optional(CONF_OFFSET, default=DEFAULT_OFFSET): NumberSelector(
NumberSelectorConfig(min=-10, max=10, step=1, mode=NumberSelectorMode.BOX)
),
vol.Optional(CONF_WORKDAYS, default=DEFAULT_WORKDAYS): SelectSelector(
SelectSelectorConfig(
options=ALLOWED_DAYS,
multiple=True,
mode=SelectSelectorMode.DROPDOWN,
translation_key="days",
)
),
vol.Optional(CONF_ADD_HOLIDAYS, default=[]): SelectSelector(
SelectSelectorConfig(
options=[],

View File

@ -23,13 +23,13 @@
"language": "Language for named holidays"
},
"data_description": {
"excludes": "List of workdays to exclude",
"days_offset": "Days offset",
"workdays": "List of workdays",
"excludes": "List of workdays to exclude, notice the keyword `holiday` and read the documentation on how to use it correctly",
"days_offset": "Days offset from current day",
"workdays": "List of working days",
"add_holidays": "Add custom holidays as YYYY-MM-DD or as range using `,` as separator",
"remove_holidays": "Remove holidays as YYYY-MM-DD, as range using `,` as separator or by using partial of name",
"province": "State, Territory, Province, Region of Country",
"language": "Choose the language you want to configure named holidays after"
"province": "State, territory, province or region of country",
"language": "Language to use when configuring named holiday exclusions"
}
}
},