mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-23 09:17:06 +00:00
Minor updates
This commit is contained in:
parent
053e658307
commit
5614baaa74
@ -18,11 +18,14 @@ This offers the official frontend to control Home Assistant.
|
|||||||
frontend:
|
frontend:
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Themes
|
### {% linkable_title Themes %}
|
||||||
|
|
||||||
Starting with version 0.49 you can define themes:
|
Starting with version 0.49 you can define themes:
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
|
# Example configuration.yaml entry
|
||||||
frontend:
|
frontend:
|
||||||
themes:
|
themes:
|
||||||
happy:
|
happy:
|
||||||
@ -31,13 +34,15 @@ frontend:
|
|||||||
primary-color: blue
|
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:
|
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:
|
Example in automation:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
automation:
|
automation:
|
||||||
- alias: 'Set theme at startup'
|
- alias: 'Set theme at startup'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user