Update frontend.markdown (#3080)
* Update frontend.markdown add example of automation * Update frontend.markdown * Update frontend.markdown
This commit is contained in:
parent
1c19c8ec10
commit
b2b36f0dda
1 changed files with 14 additions and 0 deletions
|
@ -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
|
||||
```
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue