mirror of
https://github.com/home-assistant/core.git
synced 2025-07-21 12:17:07 +00:00
Migrate frontend services to support translations (#96342)
Co-authored-by: c0ffeeca7 <38767475+c0ffeeca7@users.noreply.github.com>
This commit is contained in:
parent
2220396c41
commit
6b980eb0a7
@ -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.
|
||||
|
30
homeassistant/components/frontend/strings.json
Normal file
30
homeassistant/components/frontend/strings.json
Normal 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"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user