From fc0897434c8fa8b7f3b162cf1a1b17e0de368433 Mon Sep 17 00:00:00 2001 From: CCOSTAN Date: Thu, 4 May 2017 14:00:40 +0000 Subject: [PATCH] Ability to skip the greeting when responding to a command. --- script/voice_notify.yaml | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/script/voice_notify.yaml b/script/voice_notify.yaml index a7967be5..e49db917 100755 --- a/script/voice_notify.yaml +++ b/script/voice_notify.yaml @@ -26,7 +26,7 @@ voice_notify: conditions: - condition: time after: '09:00:00' - before: '22:00:00' + before: '21:30:00' - condition: state entity_id: input_boolean.alert_mode state: 'on' @@ -71,12 +71,14 @@ voice_notify: data_template: message: > - {% if now().strftime("%H")|int < 12 and now().strftime("%H")|int > 6%} - Good morning. - {% elif now().strftime("%H")|int > 12 and now().strftime("%H")|int < 17%} - Good afternoon. - {% else %} - Good evening. + {% if call_no_announcement != 1 %} + {% if now().strftime("%H")|int < 12 and now().strftime("%H")|int > 6%} + Good morning. + {% elif now().strftime("%H")|int > 12 and now().strftime("%H")|int < 17%} + Good afternoon. + {% else %} + Good evening. + {% endif %} {% endif %} {%- macro responsibilities() -%}