update
Tá an tiomantas seo le fáil i:
28
automations/theme-switch.yaml
Comhad gnáth
28
automations/theme-switch.yaml
Comhad gnáth
@@ -0,0 +1,28 @@
|
||||
# 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 %}
|
||||
Tagairt in Eagrán Nua
Cuir bac ar úsáideoir