Update frontend.markdown (#3080)

* Update frontend.markdown

add example of automation

* Update frontend.markdown

* Update frontend.markdown
This commit is contained in:
LaurensBot 2017-07-29 15:11:07 +01:00 committed by Fabian Affolter
parent 1c19c8ec10
commit b2b36f0dda

View File

@ -36,3 +36,17 @@ The example above defined two themes named `happy` and `sad`. For each theme you
There are 2 themes-related services:
- `frontend.reload_themes` - reloads theme configuration from yaml.
- `frontend.set_theme(name)` - sets backend-preferred theme name.
Example in automation:
```yaml
automation:
- alias: 'Set theme at startup'
initial_state: 'on'
trigger:
- platform: homeassistant
event: start
action:
service: frontend.set_theme
data:
name: pink
```