From b2b36f0ddac912f08bbc6c2895d433789c61fa5c Mon Sep 17 00:00:00 2001 From: LaurensBot Date: Sat, 29 Jul 2017 15:11:07 +0100 Subject: [PATCH] Update frontend.markdown (#3080) * Update frontend.markdown add example of automation * Update frontend.markdown * Update frontend.markdown --- source/_components/frontend.markdown | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/source/_components/frontend.markdown b/source/_components/frontend.markdown index 785e59c7f8d..47beb0a6f7e 100644 --- a/source/_components/frontend.markdown +++ b/source/_components/frontend.markdown @@ -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 +```