diff --git a/custom_templates/time.jinja b/custom_templates/time.jinja index b7395b5..c81ad53 100644 --- a/custom_templates/time.jinja +++ b/custom_templates/time.jinja @@ -54,5 +54,5 @@ {% macro next_twitch_stream() %} {% from 'easy_time.jinja' import custom_time %} -{{ custom_time('calendar.tony_s_twitch_schedule','week,day,hour,minute') }} +{{ custom_time('calendar.tony_s_twitch_schedule','week,day,hour') }} {% endmacro %} \ No newline at end of file diff --git a/templates/speech/daily_briefing.yaml b/templates/speech/daily_briefing.yaml index ae4b072..e4225ff 100644 --- a/templates/speech/daily_briefing.yaml +++ b/templates/speech/daily_briefing.yaml @@ -4,8 +4,7 @@ {% from 'speech.jinja' import greeting, dadjoke, inspirational_quote %} {% from 'time.jinja' import input_datetime_12hr, next_twitch_stream %} {% from 'status.jinja' import emma_sleep %} - {% from 'formatting.jinja' import cleanup %} - {% from 'easy_time.jinja' import count_the_days, speak_the_days %} + {% from 'easy_time.jinja' import count_the_days, custom_time %}

{{ greeting() }}

@@ -297,7 +296,7 @@ {% if is_state('input_boolean.kallen_school_today', 'on') %} {% if is_state('sensor.school_start_days2go', '0') %} - Today is the first day of school! The last day is {{ speak_the_days('input_datetime.school_last_day') }}. + Today is the first day of school! The last day is in {{ custom_time('input_datetime.school_last_day','month,week,day') }}. {% else %} {{ [ 'Today is a school day.', 'Collin has school today.', @@ -328,7 +327,7 @@ 'In case you were wondering.', 'Also, did you know.' ] | random }} - 'Thanksgiving break starts {{ speak_the_days('input_datetime.thanksgiving_break_start') }}!' + 'Thanksgiving break starts in {{ custom_time('input_datetime.thanksgiving_break_start','week,day') }}!' {% endif %} {% if (count_the_days('input_datetime.christmas_break_start') | int <= 14) and (count_the_days('input_datetime.christmas_break_start') | int > 0) %} {{ [ 'Oh, and look at that.', @@ -336,7 +335,7 @@ 'In case you were wondering.', 'Also, did you know.' ] | random }} - 'Christmas break starts {{ speak_the_days('input_datetime.christmas_break_start') }}!' + 'Christmas break starts in {{ custom_time('input_datetime.christmas_break_start','week,day') }}!' {% endif %} {% if (count_the_days('input_datetime.spring_break_start') | int <= 14) and (count_the_days('input_datetime.spring_break_start') | int > 0) %} {{ [ 'Oh, and look at that.', @@ -344,7 +343,7 @@ 'In case you were wondering.', 'Also, did you know.' ] | random }} - 'Spring break starts {{ speak_the_days('input_datetime.spring_break_start') }}!' + 'Spring break starts in {{ custom_time('input_datetime.spring_break_start','week,day') }}!' {% endif %} {% if (count_the_days('input_datetime.school_last_day') | int <= 35) and (count_the_days('input_datetime.school_last_day') | int > 0) %} {{ [ 'Oh, and look at that.', @@ -352,7 +351,7 @@ 'In case you were wondering.', 'Also, did you know.' ] | random }} - The school year ends {{ speak_the_days('input_datetime.school_last_day') }}. + The school year ends in {{ custom_time('input_datetime.school_last_day','week,day') }}. {% endif %} {% if count_the_days('input_datetime.school_last_day') | int == 0 %} Congratulations, today is the last day of school! Have an awesome day! @@ -364,7 +363,7 @@

- {{ cleanup(emma_sleep()) }} + {{ emma_sleep() }}

@@ -388,7 +387,7 @@

{% if state_attr('calendar.garbage_collection','start_time') != none %} - {% if count_the_days('calendar.garbage_collection','start_time') == 1 %} + {% if count_the_days('calendar.garbage_collection','start_time') | int == 1 %} {% if state_attr('calendar.garbage_collection','message') == 'Large Garbage Pickup' %} Tomorrow is the monthly unlimited garbage pickup. Make sure to take out all regular trash, as well as any larger items that need to be disposed of. {% else %} diff --git a/templates/speech/kallen_morning_briefing.yaml b/templates/speech/kallen_morning_briefing.yaml index 568f9b9..4a0d0d0 100644 --- a/templates/speech/kallen_morning_briefing.yaml +++ b/templates/speech/kallen_morning_briefing.yaml @@ -3,7 +3,7 @@ {%- macro getReport() -%} {% from 'time.jinja' import current_time_12hr, current_date_readout, input_datetime_12hr %} {% from 'speech.jinja' import dadjoke, inspirational_quote %} - {% from 'easy_time.jinja' import count_the_days, speak_the_days %} + {% from 'easy_time.jinja' import count_the_day, custom_time %}

Good morning, Collin. @@ -138,7 +138,7 @@ 'In case you were wondering.', 'Also, did you know.' ] | random }} - 'Thanksgiving break starts {{ speak_the_days('input_datetime.thanksgiving_break_start') }}!' + 'Thanksgiving break starts in {{ custom_time('input_datetime.thanksgiving_break_start','week,day') }}!' {% endif %} {% if (count_the_days('input_datetime.christmas_break_start') | int <= 14) and (count_the_days('input_datetime.christmas_break_start') | int > 0) %} {{ [ 'Oh, and look at that.', @@ -146,7 +146,7 @@ 'In case you were wondering.', 'Also, did you know.' ] | random }} - 'Christmas break starts {{ speak_the_days('input_datetime.christmas_break_start') }}!' + 'Christmas break starts in {{ custom_time('input_datetime.christmas_break_start','week,day') }}!' {% endif %} {% if (count_the_days('input_datetime.spring_break_start') | int <= 14) and (count_the_days('input_datetime.spring_break_start') | int > 0) %} {{ [ 'Oh, and look at that.', @@ -154,7 +154,7 @@ 'In case you were wondering.', 'Also, did you know.' ] | random }} - 'Spring break starts in {{ speak_the_days('input_datetime.spring_break_start') }}!' + 'Spring break starts in {{ custom_time('input_datetime.spring_break_start','week,day') }}!' {% endif %} {% if (count_the_days('input_datetime.school_last_day') | int < 35) and (count_the_days('input_datetime.school_last_day') | int > 0) -%} diff --git a/templates/speech/kallen_nightly_briefing.yaml b/templates/speech/kallen_nightly_briefing.yaml index fa45dfd..497fdca 100644 --- a/templates/speech/kallen_nightly_briefing.yaml +++ b/templates/speech/kallen_nightly_briefing.yaml @@ -2,7 +2,7 @@ {# Kallen Nightly Briefing #} {%- macro getReport() -%} {% from 'speech.jinja' import dadjoke %} - {% from 'easy_time.jinja' import count_the_days, speak_the_days %} + {% from 'easy_time.jinja' import count_the_days, custom_time %}

Good Evening, Collin, it is currently {{ now().strftime("%I:%M %p") }}. {{ [ 'My sensors are detecting a strange smell. I am running diagnostics. But in the mean time, you should start a shower.', @@ -61,7 +61,7 @@ 'In case you were wondering.', 'Also, did you know.' ] | random }} - 'Thanksgiving break starts {{ speak_the_days('input_datetime.thanksgiving_break_start') }}!' + 'Thanksgiving break starts in {{ custom_time('input_datetime.thanksgiving_break_start','week,day') }}!' {% endif %} {% if (count_the_days('input_datetime.christmas_break_start') | int <= 14) and (count_the_days('input_datetime.christmas_break_start') | int > 0) %} {{ [ 'Oh, and look at that.', @@ -69,7 +69,7 @@ 'In case you were wondering.', 'Also, did you know.' ] | random }} - 'Christmas break starts {{ speak_the_days('input_datetime.christmas_break_start') }}!' + 'Christmas break starts in {{ custom_time('input_datetime.christmas_break_start','week,day') }}!' {% endif %} {% if (count_the_days('input_datetime.spring_break_start') | int <= 14) and (count_the_days('input_datetime.spring_break_start') | int > 0) %} {{ [ 'Oh, and look at that.', @@ -77,7 +77,7 @@ 'In case you were wondering.', 'Also, did you know.' ] | random }} - 'Spring break starts {{ speak_the_days('input_datetime.spring_break_start') }}!' + 'Spring break starts in {{ custom_time('input_datetime.spring_break_start','week,day') }}!' {% endif %} {% if (count_the_days('input_datetime.school_last_day') | int < 35) and (count_the_days('input_datetime.school_last_day') | int > 0) -%} {{ [ 'School is almost over for the year.', diff --git a/templates/speech/morning_briefing.yaml b/templates/speech/morning_briefing.yaml index a2e0076..ca37307 100644 --- a/templates/speech/morning_briefing.yaml +++ b/templates/speech/morning_briefing.yaml @@ -160,7 +160,7 @@

{% if state_attr('calendar.garbage_collection','start_time') != none %} - {% if count_the_days('calendar.garbage_collection','start_time') == 1 %} + {% if count_the_days('calendar.garbage_collection','start_time') | int == 1 %} {% if state_attr('calendar.garbage_collection','message') == 'Large Garbage Pickup' %} Tomorrow is the monthly unlimited garbage pickup. Make sure to take out all regular trash, as well as any larger items that need to be disposed of. {% else %} diff --git a/templates/speech/nightly_briefing.yaml b/templates/speech/nightly_briefing.yaml index b74fe57..f1c13cc 100644 --- a/templates/speech/nightly_briefing.yaml +++ b/templates/speech/nightly_briefing.yaml @@ -4,7 +4,6 @@ {% from 'speech.jinja' import greeting, dadjoke, inspirational_quote %} {% from 'time.jinja' import input_datetime_12hr, read_time_from_calendar, next_twitch_stream %} {% from 'status.jinja' import emma_sleep %} - {% from 'formatting.jinja' import cleanup %} {% from 'easy_time.jinja' import count_the_days %}

{{ greeting() }} @@ -227,7 +226,7 @@

- {{ cleanup(emma_sleep()) }} + {{ emma_sleep() }}

@@ -256,7 +255,7 @@

{% if state_attr('calendar.garbage_collection','start_time') != none %} - {% if count_the_days('calendar.garbage_collection','start_time') == 1 %} + {% if count_the_days('calendar.garbage_collection','start_time') | int == 1 %} {% if state_attr('calendar.garbage_collection','message') == 'Large Garbage Pickup' %} Tomorrow is the monthly unlimited garbage pickup. Make sure to take out all regular trash, as well as any larger items that need to be disposed of. {% else %} diff --git a/templates/speech/welcome_home.yaml b/templates/speech/welcome_home.yaml index 736fa84..4fccc75 100644 --- a/templates/speech/welcome_home.yaml +++ b/templates/speech/welcome_home.yaml @@ -4,7 +4,6 @@ {% from 'speech.jinja' import dadjoke %} {% from 'time.jinja' import input_datetime_12hr %} {% from 'status.jinja' import emma_sleep %} - {% from 'formatting.jinja' import cleanup %} {% from 'easy_time.jinja' import count_the_days %}

"Welcome home, " @@ -152,12 +151,12 @@

- {{ cleanup(emma_sleep()) }} + {{ emma_sleep() }}

{% if state_attr('calendar.garbage_collection','start_time') != none %} - {% if count_the_days('calendar.garbage_collection','start_time') == 1 %} + {% if count_the_days('calendar.garbage_collection','start_time') | int == 1 %} {% if state_attr('calendar.garbage_collection','message') == 'Large Garbage Pickup' %} Tomorrow is the monthly unlimited garbage pickup. Make sure to take out all regular trash, as well as any larger items that need to be disposed of. {% else %}