From 78321a8a3462df0701b18a4b32ceef7c9c395b67 Mon Sep 17 00:00:00 2001 From: Giorgio Ravera Date: Mon, 14 Dec 2020 14:17:41 +0100 Subject: [PATCH] Improved shorthand notation for Template conditions --- packages/central_heating.yaml | 8 ++------ packages/zigbee2mqtt.yaml | 4 +--- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/packages/central_heating.yaml b/packages/central_heating.yaml index 29c755a5..72b757cd 100644 --- a/packages/central_heating.yaml +++ b/packages/central_heating.yaml @@ -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: diff --git a/packages/zigbee2mqtt.yaml b/packages/zigbee2mqtt.yaml index 48e5d004..3a19d3e5 100644 --- a/packages/zigbee2mqtt.yaml +++ b/packages/zigbee2mqtt.yaml @@ -246,9 +246,7 @@ automation: trigger: platform: mqtt topic: 'zigbee2mqtt/bridge/log' - condition: - condition: template - value_template: '{{trigger.payload_json.type == "pairing" and trigger.payload_json.message == "interview_successful"}}' + condition: '{{trigger.payload_json.type == "pairing" and trigger.payload_json.message == "interview_successful"}}' action: - service: persistent_notification.create data_template: -- 2.47.3