Skip to content

Commit 372bb97

Browse files
andrey-gitballoob
authored andcommitted
Add themes documentation (home-assistant#2966)
1 parent d199b4e commit 372bb97

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

source/_components/frontend.markdown

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,22 @@ This offers the official frontend to control Home Assistant.
1717
# Example configuration.yaml entry
1818
frontend:
1919
```
20+
21+
#### Themes
22+
Starting with version 0.49 you can define themes:
23+
24+
Example:
25+
```yaml
26+
frontend:
27+
themes:
28+
happy:
29+
primary-color: pink
30+
sad:
31+
primary-color: blue
32+
```
33+
34+
The example above defined two themes named `happy` and `sad`. For each theme you can set values for CSS variables. For a partial list of variables used by the main frontend see [ha-style.html](https://github.com/home-assistant/home-assistant-polymer/blob/master/src/resources/ha-style.html)
35+
36+
There are 2 themes-related services:
37+
- `frontend.reload_themes` - reloads theme configuration from yaml.
38+
- `frontend.set_theme(name)` - sets backend-preferred theme name.

0 commit comments

Comments
 (0)