Migrate frontend services to support translations (#96342)

Co-authored-by: c0ffeeca7 <38767475+c0ffeeca7@users.noreply.github.com>
This commit is contained in:
Franck Nijhof 2023-07-24 18:35:26 +02:00 committed by GitHub
parent 2220396c41
commit 6b980eb0a7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 33 additions and 13 deletions

View File

@ -1,29 +1,19 @@
# Describes the format for available frontend services
set_theme:
name: Set theme
description: Set a theme unless the client selected per-device theme.
fields:
name:
name: Theme
description: Name of a predefined theme
required: true
example: "default"
selector:
theme:
include_default: true
mode:
name: Mode
description: The mode the theme is for.
default: "light"
selector:
select:
options:
- label: "Dark"
value: "dark"
- label: "Light"
value: "light"
- "dark"
- "light"
translation_key: mode
reload_themes:
name: Reload themes
description: Reload themes from YAML configuration.

View File

@ -0,0 +1,30 @@
{
"services": {
"set_theme": {
"name": "Set the default theme",
"description": "Sets the default theme Home Assistant uses. Can be overridden by a user.",
"fields": {
"name": {
"name": "Theme",
"description": "Name of a theme."
},
"mode": {
"name": "Mode",
"description": "Theme mode."
}
}
},
"reload_themes": {
"name": "Reload themes",
"description": "Reloads themes from the YAML-configuration."
}
},
"selector": {
"mode": {
"options": {
"dark": "Dark",
"light": "Light"
}
}
}
}