From 3da54e38a2d3b40a4e986efedc2b4334803daa7f Mon Sep 17 00:00:00 2001 From: Jeffrey Stone Date: Wed, 4 Aug 2021 15:49:42 -0400 Subject: [PATCH] Updated Jarvis's words. --- config/templates/speech/daily_briefing.yaml | 11 ++++++++--- config/templates/speech/morning_wakeup_report.yaml | 12 ++++++++---- config/templates/speech/skylar_morning_briefing.yaml | 12 ++++++++---- 3 files changed, 24 insertions(+), 11 deletions(-) diff --git a/config/templates/speech/daily_briefing.yaml b/config/templates/speech/daily_briefing.yaml index d66ff30..7336853 100755 --- a/config/templates/speech/daily_briefing.yaml +++ b/config/templates/speech/daily_briefing.yaml @@ -310,9 +310,14 @@ {% if is_state('input_boolean.school_today', 'on') and state_attr('input_datetime.school_day_end', 'timestamp') < as_timestamp(now()) %} - {{ [ 'Today is a school day.', - 'It is a school day. ' - ] | random }} + {% if is_state('sensor.school_start_days2go', '0') %} + Today is the first day of school! There are {{ states('sensor.school_end_days2go') }} to go until the last day. + {% else %} + {{ [ 'Today is a school day.', + 'Skylar has school today.', + 'It is a school day. ' + ] | random }} + {% endif %} Pickup today will be at {{(state_attr('input_datetime.school_day_end', 'timestamp') | int | timestamp_custom('%I:%M %p', False)) }} {% if 'Digital Learning' in states('sensor.school_event') %} But it is a digital learning day so the commute will be short. diff --git a/config/templates/speech/morning_wakeup_report.yaml b/config/templates/speech/morning_wakeup_report.yaml index 8230a5c..ba9460a 100755 --- a/config/templates/speech/morning_wakeup_report.yaml +++ b/config/templates/speech/morning_wakeup_report.yaml @@ -93,9 +93,13 @@

{% if is_state('input_boolean.school_today', 'on') and state_attr('input_datetime.school_day_end', 'timestamp') < as_timestamp(now()) %} - {{ [ 'Today is a school day.', - 'It is a school day. ' - ] | random }} + {% if is_state('sensor.school_start_days2go', '0') %} + Today is the first day of school! + {% else %} + {{ [ 'Today is a school day.', + 'It is a school day. ' + ] | random }} + {% endif %} Pickup today will be at {{(state_attr('input_datetime.school_day_end', 'timestamp') | int | timestamp_custom('%I:%M %p', False)) }} {% if 'Digital Learning' in states('sensor.school_event') %} But it is a digital learning day so the commute will be short. @@ -107,7 +111,7 @@ But today is the last day of School! {%- endif %} {% endif %} - {% if is_state('input_boolean.school_today', 'on') and state_attr('input_datetime.school_day_end', 'timestamp') < as_timestamp(now()) %} + {% if is_state('input_boolean.school_today', 'on') and state_attr('input_datetime.school_day_end', 'timestamp') < as_timestamp(now()) and 'Digital Learning' not in states('sensor.school_event') %} {% if is_state('sensor.school_lunch', 'Nothing') %} I am not sure what the school menu is for today, so plan on Skylar taking his lunch {% else %} diff --git a/config/templates/speech/skylar_morning_briefing.yaml b/config/templates/speech/skylar_morning_briefing.yaml index 63a8422..8541e5d 100755 --- a/config/templates/speech/skylar_morning_briefing.yaml +++ b/config/templates/speech/skylar_morning_briefing.yaml @@ -58,9 +58,13 @@

{% if is_state('input_boolean.school_today', 'on') and state_attr('input_datetime.school_day_end', 'timestamp') > as_timestamp(now()) %} - {{ [ 'Today is a school day.', - 'It is a school day. ' - ] | random }} + {% if is_state('sensor.school_start_days2go', '0') %} + Today is the first day of school! + {% else %} + {{ [ 'Today is a school day.', + 'It is a school day. ' + ] | random }} + {% endif %} Pickup today will be at {{(state_attr('input_datetime.school_day_end', 'timestamp') | int | timestamp_custom('%I:%M %p', False)) }} {% if 'Digital Learning' in states('sensor.school_event') %} But it is a digital learning day so the commute will be short. @@ -91,7 +95,7 @@

- {% if is_state('input_boolean.school_today', 'on') and state_attr('input_datetime.school_day_end', 'timestamp') > as_timestamp(now()) %} + {% if is_state('input_boolean.school_today', 'on') and state_attr('input_datetime.school_day_end', 'timestamp') > as_timestamp(now()) and 'Digital Learning' not in states('sensor.school_event') %} {% if states.sensor.school_lunch.state == 'Nothing' %} I am not sure what is on the school menu today, so You may want to take your own lunch today. {% else %}