From: Giorgio Ravera Date: Tue, 19 Feb 2019 15:35:13 +0000 (+0100) Subject: Modified day/night automation to change also the theme X-Git-Url: http://git.giorgioravera.it/?a=commitdiff_plain;h=fbc61579abe966131f86eb34c2479a8c0b77c3e2;p=homeassistant.git Modified day/night automation to change also the theme --- 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 ######################################################################