More school delay and cancellation awareness #38

This commit is contained in:
2022-09-14 15:25:48 -04:00
parent b6b76f264b
commit 7d1f738105
4 changed files with 17 additions and 3 deletions

View File

@ -272,7 +272,7 @@
Tina has work today. Tina has work today.
{% 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') %}
{% if is_state('sensor.school_start_days2go', '0') %} {% 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. Today is the first day of school! There are {{ states('sensor.school_end_days2go') }} to go until the last day.
{% else %} {% else %}
@ -280,12 +280,18 @@
'Colin has school today.', 'Colin has school today.',
'It is a school day. ' 'It is a school day. '
] | random }} ] | random }}
{% if is_state('input_boolean.kallen_two_hour_delay','on') %}
'But there is a two hour delay. '
{% endif %}
{% endif %} {% endif %}
<s>Pickup today will be at {{(state_attr('input_datetime.school_day_end', 'timestamp') | int | timestamp_custom('%I:%M %p', False)) }}</s> <s>Pickup today will be at {{(state_attr('input_datetime.school_day_end', 'timestamp') | int | timestamp_custom('%I:%M %p', False)) }}</s>
{% if 'Early Release' in states('sensor.school_event') %} {% if 'Early Release' in states('sensor.school_event') %}
And It is early release! And It is early release!
{% endif %} {% endif %}
{% endif %} {% endif %}
{% if is_state('input_boolean.kallen_school_cancelled','on') %}
'School has been cancelled for today. '
{% endif %}
{% if states.sensor.school_end_days2go.state | int <= 35 and states.sensor.school_end_days2go.state | int > 0 %} {% if states.sensor.school_end_days2go.state | int <= 35 and states.sensor.school_end_days2go.state | int > 0 %}
{{ [ 'Oh, and look at that.', {{ [ 'Oh, and look at that.',
'For those trying to keep count. ', 'For those trying to keep count. ',

View File

@ -95,7 +95,11 @@
{%- endif %} {%- endif %}
{% endif %} {% endif %}
{% if is_state('input_boolean.school_today', 'off') %} {% if is_state('input_boolean.school_today', 'off') %}
And look at that. You do not have school today. {% if is_state('input_boolean.kallen_school_cancelled','on') %}
"School is cancelled for today. "
{% else %}
"And look at that. You do not have school today. "
{% endif %}
{{ [ 'Guess today would be a good day to clean your room.', {{ [ 'Guess today would be a good day to clean your room.',
'You could always do some chores. HA, good one.', 'You could always do some chores. HA, good one.',
'Want to play a nice game of chess? Sorry. I meant, want to play Beam NG?', 'Want to play a nice game of chess? Sorry. I meant, want to play Beam NG?',

View File

@ -10,6 +10,8 @@
{% else %} {% else %}
"You have school today, and it is running on time. " "You have school today, and it is running on time. "
{% endif %} {% endif %}
{% elif is_state('input_boolean.kallen_school_cancelled','on') %}
"School has been cancelled for today! "
{% else %} {% else %}
"You do not have school today. Enjoy your day off! " "You do not have school today. Enjoy your day off! "
{% endif %} {% endif %}

View File

@ -32,8 +32,10 @@
'I hope school was as boring, uh I mean exciting as ever! ', 'I hope school was as boring, uh I mean exciting as ever! ',
'Hopefully your day at school was educational and fun! ', 'Hopefully your day at school was educational and fun! ',
'Do not forget to do your homework! ', 'Do not forget to do your homework! ',
'You must be glad that you school day is over! ' 'You must be glad that your school day is over! '
] | random }} ] | random }}
{% elif is_state('input_boolean.kallen_school_cancelled','on') %}
"I hope you are enjoying your free day off from school, Colin. "
{% endif %} {% endif %}
</p> </p>
<p> <p>