137 lines
6.1 KiB
YAML
137 lines
6.1 KiB
YAML
|
>
|
||
|
{# Skylar Morning Report #}
|
||
|
{%- macro getReport() -%}
|
||
|
<p>
|
||
|
Skylar,
|
||
|
{% 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.',
|
||
|
'If you have not gotten dressed it is that time.',
|
||
|
'We have reached that time during the day in which you should get dressed.'
|
||
|
] | random }}
|
||
|
{% endif %}
|
||
|
</p>
|
||
|
<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
|
||
|
{{ [ 'nice outside',
|
||
|
'pretty nice outside ',
|
||
|
'a good day to be outside ',
|
||
|
'rather enjoyable outside ',
|
||
|
] | random }}
|
||
|
today. So I suggest wearing shorts.
|
||
|
{% elif is_state('sensor.clothing_forecast', 'Toasty') %}
|
||
|
It is going to be
|
||
|
{{ [ 'bit warm ',
|
||
|
' rather warm outside ',
|
||
|
' almost too hot outside ',
|
||
|
' a little warm ',
|
||
|
] | random }}
|
||
|
today. So I suggest wearing shorts.
|
||
|
{% elif is_state('sensor.clothing_forecast', 'Hot') %}
|
||
|
It is going to be
|
||
|
{{ [ 'hot',
|
||
|
'hotter than the sun ',
|
||
|
'hotter than hot. but in a lot of bad ways ',
|
||
|
'hotter than the sun outside ',
|
||
|
'super hot ',
|
||
|
'hotter than the inside of a volcano '
|
||
|
] | random }}
|
||
|
today. So I suggest wearing shorts.
|
||
|
{% else %}
|
||
|
It is going to be {{ states.sensor.clothing_forecast.state }} today so I suggest wearing shorts.
|
||
|
{% endif %}
|
||
|
</p>
|
||
|
<p>
|
||
|
{% if states.calendar.skylar_school.attributes.offset_reached == True and is_state('calendar.school_holiday', 'off') %}
|
||
|
Because you have school today!
|
||
|
{% if states.calendar.skylar_school.attributes.description == 'early-release' %}
|
||
|
And guess what? It is early release!
|
||
|
{% endif %}
|
||
|
{% if states.calendar.skylar_school.attributes.description == 'start_thanksgiving_break' %}
|
||
|
And One More Thing. Tomorrow is the first day of Thanksgiving Break.
|
||
|
{% endif %}
|
||
|
{% if states.calendar.skylar_school.attributes.description == 'start_winter_break' %}
|
||
|
And One More Thing. Tomorrow is the first day of Winter Break.
|
||
|
{% endif %}
|
||
|
{% if states.calendar.skylar_school.attributes.description == 'start_spring_break' %}
|
||
|
And One More Thing. Tomorrow is the first day of Spring Break.
|
||
|
{% endif %}
|
||
|
{% if states.calendar.skylar_school.attributes.description == 'start_fall_break' %}
|
||
|
And One More Thing. Tomorrow is the first day of Fall Break.
|
||
|
{% endif %}
|
||
|
{% else %}
|
||
|
{% if is_state('calendar.school_holiday', 'on') %}
|
||
|
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 %}
|
||
|
|
||
|
{% endif %}
|
||
|
</p>
|
||
|
<p>
|
||
|
{% if states.calendar.skylar_school.attributes.offset_reached == True and is_state('calendar.school_holiday', 'off') %}
|
||
|
Today for Lunch at school
|
||
|
{% if states.calendar.skylar_school.attributes.description == 'lunch-nuggets' %}
|
||
|
they are having Chicken Nuggets.
|
||
|
{% elif states.calendar.skylar_school.attributes.description == 'lunch-gwinnettburger' %}
|
||
|
they are having Gwinnetts Best Burger.
|
||
|
{{ [ 'Which seems like an overstatement if you ask me.',
|
||
|
'But is it really?',
|
||
|
'If you like this, I know where to find Texas Best Barbeque.'
|
||
|
] | random }}
|
||
|
{% elif states.calendar.skylar_school.attributes.description == 'lunch-pizza' %}
|
||
|
it is Pizza.
|
||
|
{% elif states.calendar.skylar_school.attributes.description == 'lunch-minipups' %}
|
||
|
it is Mini Corn Pups.
|
||
|
{% elif states.calendar.skylar_school.attributes.description == 'lunch-hotdogs' %}
|
||
|
it is Mini Corn Pups.
|
||
|
{% else %}
|
||
|
it might be a good day to take something.
|
||
|
{% endif %}
|
||
|
{% endif %}
|
||
|
</p>
|
||
|
<p>
|
||
|
{% if is_state('calendar.school_holiday', 'on') %}
|
||
|
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. okay?',
|
||
|
'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 %}
|
||
|
</p>
|
||
|
{%- 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()) -}}
|