]> git.giorgioravera.it Git - homeassistant.git/commitdiff
Improved shorthand notation for Template conditions
authorGiorgio Ravera <giorgio.ravera@gmail.com>
Mon, 14 Dec 2020 13:17:41 +0000 (14:17 +0100)
committerGiorgio Ravera <giorgio.ravera@gmail.com>
Mon, 14 Dec 2020 13:17:41 +0000 (14:17 +0100)
packages/central_heating.yaml
packages/zigbee2mqtt.yaml

index 29c755a5981a854a1e87bb2d27dcfeaede8e1cf4..72b757cd360fc9f81db314bfe36b1f26a92b2abf 100644 (file)
@@ -55,9 +55,7 @@ automation:
     action:
       - choose:
         # Switch on
-        - conditions:
-          - condition: template
-            value_template: "{{ now().month == 11 and now().day == 1 }}"
+        - conditions: "{{ now().month == 11 and now().day == 1 }}"
           sequence:
             - service: input_boolean.turn_on
               data_template:
@@ -68,9 +66,7 @@ automation:
                 message: "Il riscaldamento centralizzato รจ stato acceso"
       
         # Switch off
-        - conditions:
-          - condition: template
-            value_template: "{{ now().month == 4 and now().day == 15 }}"
+        - conditions: "{{ now().month == 4 and now().day == 15 }}"
           sequence:
             - service: input_boolean.turn_on
               data_template:
index 48e5d004f5af11404cd645aea124593d34193ec8..3a19d3e533a7dd5a0bc6d35b7fb730349121be93 100644 (file)
@@ -246,9 +246,7 @@ automation:
     trigger:\r
       platform: mqtt\r
       topic: 'zigbee2mqtt/bridge/log'\r
-    condition:\r
-      condition: template\r
-      value_template: '{{trigger.payload_json.type == "pairing" and trigger.payload_json.message == "interview_successful"}}'\r
+    condition: '{{trigger.payload_json.type == "pairing" and trigger.payload_json.message == "interview_successful"}}'\r
     action:\r
       - service: persistent_notification.create\r
         data_template:\r