Added school break countdowns to briefings

This commit is contained in:
2022-11-23 14:45:49 -05:00
parent 911a268699
commit f26e488119
3 changed files with 72 additions and 0 deletions

View File

@ -329,6 +329,30 @@
{% if is_state('input_boolean.kallen_school_cancelled','on') %}
'School has been cancelled for today. '
{% endif %}
{% if states.sensor.thanksgiving_break_days2go.state | int <= 14 and states.sensor.thanksgiving_break_days2go.state | 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!
{% endif %}
{% if states.sensor.christmas_break_days2go.state | int <= 14 and states.sensor.christmas_break_days2go.state | 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!
{% endif %}
{% if states.sensor.spring_break_days2go.state | int <= 14 and states.sensor.spring_break_days2go.state | 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!
{% endif %}
{% if states.sensor.school_end_days2go.state | int <= 35 and states.sensor.school_end_days2go.state | int > 0 %}
{{ [ 'Oh, and look at that.',
'For those trying to keep count. ',

View File

@ -110,6 +110,30 @@
'Today would be a good day to spend some time with mom and dad.',
] | random }}
{% endif %}
{% if states.sensor.thanksgiving_break_days2go.state | int <= 14 and states.sensor.thanksgiving_break_days2go.state | 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!
{% endif %}
{% if states.sensor.christmas_break_days2go.state | int <= 14 and states.sensor.christmas_break_days2go.state | 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!
{% endif %}
{% if states.sensor.spring_break_days2go.state | int <= 14 and states.sensor.spring_break_days2go.state | 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!
{% endif %}
{% if is_state ('input_boolean.school_today', 'off') and is_state('sensor.pirateweather_icon', 'snow') %}
Do you wanna build a snowman? It's snowing!

View File

@ -52,6 +52,30 @@
{% elif states.sensor.school_start_days2go.state | int == 0 -%}
Tomorrow is the first day of school. Are you ready?
{%- endif %}
{% if states.sensor.thanksgiving_break_days2go.state | int <= 14 and states.sensor.thanksgiving_break_days2go.state | 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!
{% endif %}
{% if states.sensor.christmas_break_days2go.state | int <= 14 and states.sensor.christmas_break_days2go.state | 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!
{% endif %}
{% if states.sensor.spring_break_days2go.state | int <= 14 and states.sensor.spring_break_days2go.state | 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!
{% endif %}
{% if states.sensor.school_end_days2go.state | int < 15 and states.sensor.school_end_days2go.state | int > 0 -%}
{{ [ 'School is almost over for the year.',
'You have made it to the end of the school year.',