mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-05-04 18:18:58 +00:00

* Update frontend.markdown add example of automation * Update frontend.markdown * Update frontend.markdown
1.2 KiB
1.2 KiB
layout, title, description, date, sidebar, comments, sharing, footer, logo, ha_category
layout | title | description | date | sidebar | comments | sharing | footer | logo | ha_category |
---|---|---|---|---|---|---|---|---|---|
page | Frontend | Offers a frontend to Home Assistant. | 2015-12-06 21:35 | true | false | true | true | home-assistant.png | Other |
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:
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
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:
automation:
- alias: 'Set theme at startup'
initial_state: 'on'
trigger:
- platform: homeassistant
event: start
action:
service: frontend.set_theme
data:
name: pink