Minor updates

This commit is contained in:
Fabian Affolter 2017-08-05 09:21:29 +02:00
parent 053e658307
commit 5614baaa74
No known key found for this signature in database
GPG Key ID: DDF3D6F44AAB1336

View File

@ -18,11 +18,14 @@ This offers the official frontend to control Home Assistant.
frontend:
```
#### Themes
### {% linkable_title Themes %}
Starting with version 0.49 you can define themes:
Example:
```yaml
# Example configuration.yaml entry
frontend:
themes:
happy:
@ -31,13 +34,15 @@ frontend:
primary-color: blue
```
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)
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).
There are 2 themes-related services:
- `frontend.reload_themes` - reloads theme configuration from yaml.
- `frontend.set_theme(name)` - sets backend-preferred theme name.
- `frontend.reload_themes`: reloads theme configuration from your `configuration.yaml` file.
- `frontend.set_theme(name)`: sets backend-preferred theme name.
Example in automation:
```yaml
automation:
- alias: 'Set theme at startup'