Updated Jarvis's words.

This commit is contained in:
Jeffrey Stone 2021-08-04 15:49:42 -04:00
parent 95a6e975e5
commit 3da54e38a2
3 changed files with 24 additions and 11 deletions

View File

@ -310,9 +310,14 @@
{% 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') and state_attr('input_datetime.school_day_end', 'timestamp') < as_timestamp(now()) %}
{{ [ 'Today is a school day.', {% if is_state('sensor.school_start_days2go', '0') %}
'It is a school day. ' Today is the first day of school! There are {{ states('sensor.school_end_days2go') }} to go until the last day.
] | random }} {% else %}
{{ [ 'Today is a school day.',
'Skylar has school today.',
'It is a school day. '
] | random }}
{% 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 'Digital Learning' in states('sensor.school_event') %} {% if 'Digital Learning' in states('sensor.school_event') %}
But it is a digital learning day so the commute will be short. But it is a digital learning day so the commute will be short.

View File

@ -93,9 +93,13 @@
<p> <p>
{% 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') and state_attr('input_datetime.school_day_end', 'timestamp') < as_timestamp(now()) %}
{{ [ 'Today is a school day.', {% if is_state('sensor.school_start_days2go', '0') %}
'It is a school day. ' Today is the first day of school!
] | random }} {% else %}
{{ [ 'Today is a school day.',
'It is a school day. '
] | random }}
{% 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 'Digital Learning' in states('sensor.school_event') %} {% if 'Digital Learning' in states('sensor.school_event') %}
But it is a digital learning day so the commute will be short. But it is a digital learning day so the commute will be short.
@ -107,7 +111,7 @@
But today is the last day of School! But today is the last day of School!
{%- endif %} {%- endif %}
{% 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') and state_attr('input_datetime.school_day_end', 'timestamp') < as_timestamp(now()) and 'Digital Learning' not in states('sensor.school_event') %}
{% if is_state('sensor.school_lunch', 'Nothing') %} {% if is_state('sensor.school_lunch', 'Nothing') %}
I am not sure what the school menu is for today, so plan on Skylar taking his lunch I am not sure what the school menu is for today, so plan on Skylar taking his lunch
{% else %} {% else %}

View File

@ -58,9 +58,13 @@
<p> <p>
{% 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') and state_attr('input_datetime.school_day_end', 'timestamp') > as_timestamp(now()) %}
{{ [ 'Today is a school day.', {% if is_state('sensor.school_start_days2go', '0') %}
'It is a school day. ' Today is the first day of school!
] | random }} {% else %}
{{ [ 'Today is a school day.',
'It is a school day. '
] | random }}
{% 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 'Digital Learning' in states('sensor.school_event') %} {% if 'Digital Learning' in states('sensor.school_event') %}
But it is a digital learning day so the commute will be short. But it is a digital learning day so the commute will be short.
@ -91,7 +95,7 @@
</p> </p>
<p> <p>
{% 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') and state_attr('input_datetime.school_day_end', 'timestamp') > as_timestamp(now()) and 'Digital Learning' not in states('sensor.school_event') %}
{% if states.sensor.school_lunch.state == 'Nothing' %} {% if states.sensor.school_lunch.state == 'Nothing' %}
I am not sure what is on the school menu today, so You may want to take your own lunch today. I am not sure what is on the school menu today, so You may want to take your own lunch today.
{% else %} {% else %}