From fbc61579abe966131f86eb34c2479a8c0b77c3e2 Mon Sep 17 00:00:00 2001 From: Giorgio Ravera Date: Tue, 19 Feb 2019 16:35:13 +0100 Subject: [PATCH] Modified day/night automation to change also the theme --- automation/home_assistant.yaml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/automation/home_assistant.yaml b/automation/home_assistant.yaml index b7c70a27..a7f3f92e 100644 --- a/automation/home_assistant.yaml +++ b/automation/home_assistant.yaml @@ -76,12 +76,21 @@ - service: input_boolean.turn_on data_template: entity_id: >- - {% if now().strftime('%H')|int >= 8 and now().strftime('%H')|int < 23 %} + {% if now().strftime('%H')|int >= 8 and now().strftime('%H')|int < 23 %} input_boolean.home_mode_day {% else %} input_boolean.home_mode_night {% endif %} + - service: frontend.set_theme + data_template: + name: >- + {% if now().strftime('%H')|int >= 8 and now().strftime('%H')|int < 23 %} + default + {% else %} + midnight + {% endif %} + ###################################################################### # Home Assistant: Management of Speech Notifications ###################################################################### -- 2.47.3