mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-19 07:17:14 +00:00
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
@ -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…
x
Reference in New Issue
Block a user