From: Giorgio Ravera Date: Wed, 20 Feb 2019 12:33:46 +0000 (+0100) Subject: fixed notifiction scripts X-Git-Url: http://git.giorgioravera.it/?a=commitdiff_plain;h=e8854780985e14fbc9d7feb024dc8394fa53bf95;p=homeassistant.git fixed notifiction scripts --- diff --git a/automation/welcome.yaml b/automation/welcome.yaml index ff8e325f..e0a6bc7e 100644 --- a/automation/welcome.yaml +++ b/automation/welcome.yaml @@ -82,6 +82,7 @@ "Ciao " ~ name + "! Casa è sempre la casa!", ] | random }} {%- endmacro -%} + {{ greeting_sentence(name) }} - service: input_boolean.turn_off diff --git a/script/notify.yaml b/script/notify.yaml index c3ceba67..0597ef7b 100644 --- a/script/notify.yaml +++ b/script/notify.yaml @@ -25,8 +25,8 @@ notify_text_internal: message: "{{ message }}" - condition: template - value_template: >- - {% if enable_persistent %} + value_template: > + {% if enable_persistent | int == 1 %} true {% else %} false @@ -53,13 +53,7 @@ notify_text: {% endif %} {{ title }} message: "{{ message }}" - enable_persistent: > - {# Check Null Input #} - {% if enable_persistent %} - true - {% else %} - false - {% endif %} + enable_persistent: "{{ enable_persistent }}" ###################################################################### # Script: Voice Notification @@ -153,13 +147,7 @@ notify_all: data_template: title: "{{ title }}" message: "{{ message }}" - enable_persistent: > - {# Check Null Input #} - {% if enable_persistent %} - true - {% else %} - false - {% endif %} + enable_persistent: "{{ enable_persistent }}" - service: script.notify_voice data_template: diff --git a/script/speech_engine.yaml b/script/speech_engine.yaml index e87fca0d..9794ed80 100644 --- a/script/speech_engine.yaml +++ b/script/speech_engine.yaml @@ -20,7 +20,7 @@ speech_engine: language: "{{ language }}" message: >- {# greeting message #} - {% if enable_greeting == true %} + {% if enable_greeting | int == 1 %} {% if now().strftime('%H')|int >= 7 and now().strftime('%H')|int < 12 %} Buongiorno. {% elif now().strftime('%H')|int >= 12 and now().strftime('%H')|int < 17 %}