From 372bb97a4530fe6fd20eed98f96e693f62a1c633 Mon Sep 17 00:00:00 2001 From: Andrey Date: Thu, 13 Jul 2017 04:08:38 +0300 Subject: [PATCH] Add themes documentation (#2966) --- source/_components/frontend.markdown | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/source/_components/frontend.markdown b/source/_components/frontend.markdown index 47027c322bf..785e59c7f8d 100644 --- a/source/_components/frontend.markdown +++ b/source/_components/frontend.markdown @@ -17,3 +17,22 @@ This offers the official frontend to control Home Assistant. # Example configuration.yaml entry frontend: ``` + +#### Themes +Starting with version 0.49 you can define themes: + +Example: +```yaml +frontend: + themes: + happy: + primary-color: pink + sad: + 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) + +There are 2 themes-related services: + - `frontend.reload_themes` - reloads theme configuration from yaml. + - `frontend.set_theme(name)` - sets backend-preferred theme name.