28 Zeilen
659 B
YAML
28 Zeilen
659 B
YAML
# You can replace default by Light - Green, for example
|
|
- alias: 'Set theme at startup'
|
|
trigger:
|
|
- platform: homeassistant
|
|
event: start
|
|
action:
|
|
- service: frontend.set_theme
|
|
data:
|
|
name: default
|
|
- alias: 'Set HA theme for day and night'
|
|
trigger:
|
|
- platform: homeassistant
|
|
event: start
|
|
- platform: state
|
|
entity_id: sun.sun
|
|
to: above_horizon
|
|
- platform: state
|
|
entity_id: sun.sun
|
|
to: below_horizon
|
|
action:
|
|
- service_template: frontend.set_theme
|
|
data_template:
|
|
name: >
|
|
{% if states.sun.sun.state == "above_horizon" %}
|
|
default
|
|
{% else %}
|
|
default
|
|
{% endif %} |