From 5614baaa742f250d1f9a544b65b9887ab1919738 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 5 Aug 2017 09:21:29 +0200 Subject: [PATCH] Minor updates --- source/_components/frontend.markdown | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/source/_components/frontend.markdown b/source/_components/frontend.markdown index d2273d950c9..0fa79d15b31 100644 --- a/source/_components/frontend.markdown +++ b/source/_components/frontend.markdown @@ -18,11 +18,14 @@ This offers the official frontend to control Home Assistant. frontend: ``` -#### Themes +### {% linkable_title Themes %} + Starting with version 0.49 you can define themes: Example: + ```yaml +# Example configuration.yaml entry frontend: themes: happy: @@ -31,13 +34,15 @@ frontend: primary-color: blue ``` -The example above defined two themes named `happy` and `sad`. For each theme you can set values for CSS variables. For a partial list of variables used by the main frontend see [ha-style.html](https://github.com/home-assistant/home-assistant-polymer/blob/master/src/resources/ha-style.html) +The example above defined two themes named `happy` and `sad`. For each theme you can set values for CSS variables. For a partial list of variables used by the main frontend see [ha-style.html](https://github.com/home-assistant/home-assistant-polymer/blob/master/src/resources/ha-style.html). There are 2 themes-related services: - - `frontend.reload_themes` - reloads theme configuration from yaml. - - `frontend.set_theme(name)` - sets backend-preferred theme name. + + - `frontend.reload_themes`: reloads theme configuration from your `configuration.yaml` file. + - `frontend.set_theme(name)`: sets backend-preferred theme name. Example in automation: + ```yaml automation: - alias: 'Set theme at startup'