Add easy time macros to relevant TTS briefings
This commit is contained in:
@ -3,6 +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 %}
|
||||
<p>
|
||||
Good morning, Collin.
|
||||
|
||||
@ -47,7 +48,7 @@
|
||||
|
||||
<p>
|
||||
{% if is_state('input_boolean.kallen_school_today', 'on') %}
|
||||
{% if is_state('sensor.school_start_days2go', '0') %}
|
||||
{% if count_the_days('input_datetime.school_first_day') | int == 0 %}
|
||||
Today is the first day of school!
|
||||
{% else %}
|
||||
{{ [ 'Today is a school day.',
|
||||
@ -96,7 +97,7 @@
|
||||
Today, you will be picked up from school by your dad.
|
||||
{% endif %}
|
||||
<s>Pickup today will be at {{ input_datetime_12hr('input_datetime.kallen_school_day_end') }}</s>
|
||||
{% if states.sensor.school_end_days2go.state | int == 0 -%}
|
||||
{% if count_the_days('input_datetime.school_last_day') | int == 0 -%}
|
||||
But today is the last day of School!
|
||||
{%- endif %}
|
||||
{{ [
|
||||
@ -131,36 +132,49 @@
|
||||
'Do not let your sister eat you for breakfast.',
|
||||
] | random }}
|
||||
{% endif %}
|
||||
{% if states.sensor.thanksgiving_break_days2go.state | int <= 14 and states.sensor.thanksgiving_break_days2go.state | int > 0 %}
|
||||
{% if (count_the_days('input_datetime.thanksgiving_break_start') | int <= 14) and (count_the_days('input_datetime.thanksgiving_break_start') | int > 0) %}
|
||||
{{ [ 'Oh, and look at that.',
|
||||
'For those trying to keep count. ',
|
||||
'In case you were wondering.',
|
||||
'Also, did you know.'
|
||||
] | random }}
|
||||
There are only {{ states.sensor.thanksgiving_break_days2go.state }} days until Thanksgiving Break!
|
||||
'Thanksgiving break starts {{ speak_the_days('input_datetime.thanksgiving_break_start') }}!'
|
||||
{% endif %}
|
||||
{% if states.sensor.christmas_break_days2go.state | int <= 14 and states.sensor.christmas_break_days2go.state | int > 0 %}
|
||||
{% 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.',
|
||||
'For those trying to keep count. ',
|
||||
'In case you were wondering.',
|
||||
'Also, did you know.'
|
||||
] | random }}
|
||||
There are only {{ states.sensor.christmas_break_days2go.state }} days until Christmas Break!
|
||||
'Christmas break starts {{ speak_the_days('input_datetime.christmas_break_start') }}!'
|
||||
{% endif %}
|
||||
{% if states.sensor.spring_break_days2go.state | int <= 14 and states.sensor.spring_break_days2go.state | int > 0 %}
|
||||
{% 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.',
|
||||
'For those trying to keep count. ',
|
||||
'In case you were wondering.',
|
||||
'Also, did you know.'
|
||||
] | random }}
|
||||
There are only {{ states.sensor.spring_break_days2go.state }} days until Spring Break!
|
||||
'Spring break starts in {{ speak_the_days('input_datetime.spring_break_start') }}!'
|
||||
{% 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.',
|
||||
'You have made it to the end of the school year.',
|
||||
'You are almost done with school.'
|
||||
] | random }}
|
||||
There are only {{ count_the_days('input_datetime.school_last_day') }} days
|
||||
{{ [ 'left in the school year ',
|
||||
' left of school.',
|
||||
'Until the last day of school.'
|
||||
] | random }}
|
||||
{%- endif %}
|
||||
|
||||
{% if is_state ('input_boolean.kallen_school_today', 'off') and is_state('sensor.pirateweather_icon', 'snow') %}
|
||||
Do you wanna build a snowman? It is snowing!
|
||||
{% endif %}
|
||||
|
||||
{% if states.sensor.school_end_days2go.state | int == -1 -%}
|
||||
|
||||
{% if count_the_days('input_datetime.school_last_day') | int == -1 -%}
|
||||
Today is the first day of Summer Break!
|
||||
{%- endif %}
|
||||
|
||||
|
Reference in New Issue
Block a user