mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 11:17:21 +00:00
Make Workday UI setup nicer (#105407)
This commit is contained in:
parent
cedac41407
commit
c0314cd05c
@ -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=[],
|
||||
|
@ -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"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user