Various briefing tweaks and fixes

This commit is contained in:
2023-05-08 16:12:49 -04:00
parent 1d77b557ad
commit 772d3ae3e6
7 changed files with 22 additions and 25 deletions

View File

@ -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 %}

View File

@ -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 %}
<p>
{{ greeting() }}
</p>
@ -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 @@
</p>
<p>
{{ cleanup(emma_sleep()) }}
{{ emma_sleep() }}
</p>
<p>
@ -388,7 +387,7 @@
<p>
{% 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 %}

View File

@ -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 %}
<p>
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) -%}

View File

@ -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 %}
<p>
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.',

View File

@ -160,7 +160,7 @@
<p>
{% 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 %}

View File

@ -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 %}
<p>
{{ greeting() }}
@ -227,7 +226,7 @@
</p>
<p>
{{ cleanup(emma_sleep()) }}
{{ emma_sleep() }}
</p>
<p>
@ -256,7 +255,7 @@
<p>
{% 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 %}

View File

@ -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 %}
<p>
"Welcome home, "
@ -152,12 +151,12 @@
</p>
<p>
{{ cleanup(emma_sleep()) }}
{{ emma_sleep() }}
</p>
<p>
{% 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 %}