2020-12-03 03:55:11 +00:00
>
{# Skylar Morning Report #}
{%- macro getReport() -%}
<p>
2021-04-22 00:24:21 +00:00
Good morning, Skylar.
<s>It is {{ now().strftime("%I:%M %p") }}</s>
2020-12-03 03:55:11 +00:00
{% if is_state('sensor.birthday_skylar', '0') %}
Even birthday boys have to get dressed. So get to it.
{% else %}
{{ [ 'It is time to get dressed. ' ,
'It is time to put some real clothes on. ' ,
'it is now time to change your underwear.' ,
'You need to get dressed for the day.' ,
2021-04-22 00:24:21 +00:00
'If you have not gotten dressed it is that time.'
2020-12-03 03:55:11 +00:00
] | random }}
{% endif %}
</p>
2021-04-22 00:24:21 +00:00
2020-12-03 03:55:11 +00:00
<p>
{% if is_state('sensor.clothing_forecast', 'Freezing') %}
It is going to be freezing today. so I suggest wearing long pants and a heavy coat.
{% elif is_state('sensor.clothing_forecast','Cold') %}
It is going to be cold today. so I suggest wearing long pants and a light jacket.
{% elif is_state('sensor.clothing_forecast', 'Chilly') %}
It is going to be chilly today. so I suggest wearing at least long pants.
{% elif is_state('sensor.clothing_forecast', 'Nice') %}
It is going to be
2021-03-14 03:28:49 +00:00
{{ [ 'nice outside.' ,
'pretty nice outside. ' ,
'a good day to be outside. ' ,
'rather enjoyable outside. ' ,
2020-12-03 03:55:11 +00:00
] | random }}
2021-03-14 03:28:49 +00:00
So I suggest wearing shorts.
2020-12-03 03:55:11 +00:00
{% elif is_state('sensor.clothing_forecast', 'Toasty') %}
It is going to be
2021-03-14 03:28:49 +00:00
{{ [ 'bit warm today. ' ,
' rather warm outside. ' ,
' almost too hot outside. ' ,
' a little warm today. ' ,
2020-12-03 03:55:11 +00:00
] | random }}
2021-03-14 03:28:49 +00:00
So I suggest wearing shorts.
2020-12-03 03:55:11 +00:00
{% elif is_state('sensor.clothing_forecast', 'Hot') %}
It is going to be
{{ [ 'hot' ,
2021-03-14 03:28:49 +00:00
'hotter than the sun today. ' ,
'hotter than hot. but in a lot of bad ways today. ' ,
'hotter than the sun outside. ' ,
'super hot today. ' ,
'hotter than the inside of a volcano today. Well not exactly, but you get the point. '
2020-12-03 03:55:11 +00:00
] | random }}
2021-03-14 03:28:49 +00:00
So I suggest wearing shorts.
2020-12-03 03:55:11 +00:00
{% else %}
It is going to be {{ states.sensor.clothing_forecast.state }} today so I suggest wearing shorts.
{% endif %}
</p>
2021-04-22 00:24:21 +00:00
2020-12-03 03:55:11 +00:00
<p>
2021-05-24 15:46:53 +00:00
{% if is_state('input_boolean.school_today', 'on') and state_attr('input_datetime.school_day_end', 'timestamp') > as_timestamp(now()) %}
2021-08-04 19:49:42 +00:00
{% if is_state('sensor.school_start_days2go', '0') %}
Today is the first day of school!
{% else %}
{{ [ 'Today is a school day.' ,
'It is a school day. '
] | random }}
{% endif %}
2021-05-24 15:46:53 +00:00
<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') %}
But it is a digital learning day so the commute will be short.
{% endif %}
{% if 'Early Release' in states('sensor.school_event') %}
And It is early release!
2020-12-03 03:55:11 +00:00
{% endif %}
2021-04-22 00:24:21 +00:00
{% if states.sensor.school_end_days2go.state | int == 0 -%}
2021-05-24 15:46:53 +00:00
But today is the last day of School!
{%- endif %}
{% endif %}
{% if 'School Holiday' in states('sensor.school_event') and is_state('input_boolean.school_today', 'off') %}
2020-12-03 03:55:11 +00:00
And look at that. You do not have school today. Because it is {{ states.calendar.school_holiday.attributes.message }}.
{{ [ 'Guess today would be a good day to clean your room.' ,
'You could always do some chores.' ,
'Lets try to keep the TV off today, ok?' ,
'Want to play a nice game of chess? Sorry. I meant, want to play Thermal Nuclear War.' ,
'I hope you enjoy your day off. You deserve it.' ,
'Today would be a good day to spend some time with mom and dad.'
] | random }}
{% endif %}
2021-05-24 15:46:53 +00:00
{% if states.sensor.school_end_days2go.state | int == -1 -%}
Today is the first day of Summer Break!
{%- endif %}
2020-12-03 03:55:11 +00:00
</p>
2021-04-22 00:24:21 +00:00
2020-12-03 03:55:11 +00:00
<p>
2021-08-04 19:49:42 +00:00
{% 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') %}
2021-03-14 03:28:49 +00:00
{% if states.sensor.school_lunch.state == 'Nothing' %}
2021-05-24 15:46:53 +00:00
I am not sure what is on the school menu today, so You may want to take your own lunch today.
2020-12-03 03:55:11 +00:00
{% else %}
2021-03-14 03:28:49 +00:00
Today's school lunch is {{ states.sensor.school_lunch.state }}
2020-12-03 03:55:11 +00:00
{% endif %}
{% endif %}
</p>
2021-05-24 15:46:53 +00:00
2021-04-22 00:24:21 +00:00
{% if is_state('calendar.skylar_events', 'on') %}
You have {{ states.calendar.skylar_events.attributes.message }} today as well!
{% endif %}
2020-12-03 03:55:11 +00:00
{%- endmacro -%}
{# a macro that removes all newline characters, empty spaces, and returns formatted text #}
{%- macro cleanup(data) -%}
{%- for item in data.split("\n") if item | trim != "" -%}
{{ item | trim }} {% endfor -%}
{%- endmacro -%}
{# a macro to call all macros :) #}
{%- macro mother_of_all_macros() -%}
{{ getReport() }}
{%- endmacro -%}
{# Call the macro #}
{{- cleanup(mother_of_all_macros()) -}}