From 2e792df6034ce63014e9167655da7cd6b54f06d0 Mon Sep 17 00:00:00 2001 From: Giorgio Ravera Date: Mon, 11 Feb 2019 16:02:49 +0100 Subject: [PATCH] Fixed other issue into the climate script --- script/climate.yaml | 20 ++++++++++---------- script/speech_engine.yaml | 9 +++------ 2 files changed, 13 insertions(+), 16 deletions(-) diff --git a/script/climate.yaml b/script/climate.yaml index 5ac83826..7813ab45 100644 --- a/script/climate.yaml +++ b/script/climate.yaml @@ -17,21 +17,21 @@ climate_daily_schedule: sequence: - service: climate.set_temperature data_template: - entity_id: {{ entity_id }} + entity_id: "{{ entity_id }}" temperature: >- {% set current_date_string = now().strftime("%H%M") %} - {% set time1_string = ("0630") %} - {% set time2_string = ("0730") %} - {% set time3_string = ("0900") %} - {% set time4_string = ("1830") %} - {% set time5_string = ("2200") %} - {% if (current_date_string|int >= (time1_string)|int) and ((current_date_string|int < (time2_string)|int)) %} + {% set time1_string = "0630" %} + {% set time2_string = "0730" %} + {% set time3_string = "0900" %} + {% set time4_string = "1830" %} + {% set time5_string = "2200" %} + {% if ((current_date_string|int) >= (time1_string|int)) and ((current_date_string|int) < (time2_string|int)) %} {{ temp1 }} - {% eliif (current_date_string|int >= (time2_string)|int) and ((current_date_string|int < (time3_string)|int)) %} + {% elif ((current_date_string|int) >= (time2_string|int)) and ((current_date_string|int) < (time3_string|int)) %} {{ temp2 }} - {% elif (current_date_string|int >= (time3_string)|int) and ((current_date_string|int < (time4_string)|int)) %} + {% elif ((current_date_string|int) >= (time3_string|int)) and ((current_date_string|int) < (time4_string|int)) %} {{ temp3 }} - {% elif (current_date_string|int >= (time4_string)|int) and ((current_date_string|int < (time5_string)|int)) %} + {% elif ((current_date_string|int) >= (time4_string|int)) and ((current_date_string|int) < (time5_string|int)) %} {{ temp4 }} {% else % } {{ temp5 }} diff --git a/script/speech_engine.yaml b/script/speech_engine.yaml index 9292bf29..e87fca0d 100644 --- a/script/speech_engine.yaml +++ b/script/speech_engine.yaml @@ -15,12 +15,9 @@ speech_engine: sequence: - service: script.notify_voice data_template: - media_player: >- - {{ media_player }} - volume_level: >- - {{ volume_level }} - language: >- - {{ language }} + media_player: "{{ media_player }}" + volume_level: "{{ volume_level }}" + language: "{{ language }}" message: >- {# greeting message #} {% if enable_greeting == true %} -- 2.47.3