]> git.giorgioravera.it Git - homeassistant.git/commitdiff
Modified day/night automation to change also the theme
authorGiorgio Ravera <giorgio.ravera@gmail.com>
Tue, 19 Feb 2019 15:35:13 +0000 (16:35 +0100)
committerGiorgio Ravera <giorgio.ravera@gmail.com>
Thu, 21 Feb 2019 12:22:56 +0000 (13:22 +0100)
automation/home_assistant.yaml

index b7c70a27bf1024aa80f1561e23b053cd5560e9dd..a7f3f92ecafd309b3107cb11e7597b67b9679a7a 100644 (file)
     - 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
 ######################################################################