Add night mode example

This commit is contained in:
Fabian Affolter 2017-08-22 08:02:09 +02:00
parent d0e6af2e7c
commit 71ab7f941c
No known key found for this signature in database
GPG Key ID: DDF3D6F44AAB1336

View File

@ -43,6 +43,8 @@ There are 2 themes-related services:
Example in automation:
Set a theme at the startup of Home Assistant:
```yaml
automation:
- alias: 'Set theme at startup'
@ -55,6 +57,22 @@ automation:
data:
name: happy
```
To enable "night mode":
```yaml
automation:
- alias: 'Set dark theme for the night'
initial_state: True
trigger:
- platform: time
at: '21:00'
action:
- service: frontend.set_theme
data:
name: darkred
```
### {% linkable_title Manual Theme Selection %}
When themes are enabled in the `configuration.yaml` file, a new option will show up in the Configuration panel under `configuration.yaml` called "Set a theme." You can then choose any installed theme from the dropdown list and it will be applied immediately.