| 
									
										
										
										
											2020-12-02 22:55:11 -05:00
										 |  |  | >
 | 
					
						
							|  |  |  |   {# Morning Wakeup Report #}
 | 
					
						
							|  |  |  |   {%- macro getReport() -%}
 | 
					
						
							|  |  |  |     <p>
 | 
					
						
							| 
									
										
										
										
											2020-12-12 20:50:38 -05:00
										 |  |  |     
 | 
					
						
							| 
									
										
										
										
											2020-12-02 22:55:11 -05:00
										 |  |  |       Good morning.
 | 
					
						
							| 
									
										
										
										
											2020-12-12 20:50:38 -05:00
										 |  |  |     
 | 
					
						
							| 
									
										
										
										
											2020-12-02 22:55:11 -05:00
										 |  |  |     </p>
 | 
					
						
							|  |  |  |     <p>
 | 
					
						
							|  |  |  |     {% if now().strftime('%H')|int < 12 %}
 | 
					
						
							|  |  |  |       {% if now().strftime('%M')|int == 0 %}
 | 
					
						
							|  |  |  |         It is {{ now().strftime('%H')|int }} AM.
 | 
					
						
							|  |  |  |       {% else %}
 | 
					
						
							|  |  |  |         It is {{ now().strftime('%H')|int }} {{ now().strftime('%M')|int }} AM.
 | 
					
						
							|  |  |  |       {% endif %}
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     {% elif now().strftime('%H')|int > 12 %}
 | 
					
						
							|  |  |  |       {% if now().strftime('%M')|int == 0 %}
 | 
					
						
							|  |  |  |         It is {{ now().strftime('%H')|int }} PM.
 | 
					
						
							|  |  |  |       {% else %}
 | 
					
						
							|  |  |  |         It is {{ now().strftime('%H')|int }} {{ now().strftime('%M')|int }} PM.
 | 
					
						
							|  |  |  |       {% endif %}
 | 
					
						
							|  |  |  |     
 | 
					
						
							|  |  |  |     {% else %}
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     {% endif %}
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-03-13 22:28:49 -05:00
										 |  |  |     Today is {{states.sensor.today_is.state }}.
 | 
					
						
							| 
									
										
										
										
											2020-12-02 22:55:11 -05:00
										 |  |  |     </p>
 | 
					
						
							|  |  |  |     <p>
 | 
					
						
							| 
									
										
										
										
											2021-01-18 20:49:08 -05:00
										 |  |  |       It is currently {{states.weather.home.state}} and {{states.sensor.acurite_6045m_3078_t.state|round}} degrees in Grayson. 
 | 
					
						
							| 
									
										
										
										
											2020-12-02 22:55:11 -05:00
										 |  |  |     </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           
 | 
					
						
							| 
									
										
										
										
											2021-03-13 22:28:49 -05:00
										 |  |  |         {{ [ 'nice outside. ',
 | 
					
						
							|  |  |  |           'pretty nice outside. ',
 | 
					
						
							|  |  |  |           'a good day to be outside. ',
 | 
					
						
							|  |  |  |           'rather enjoyable outside. ',
 | 
					
						
							| 
									
										
										
										
											2020-12-02 22:55:11 -05:00
										 |  |  |         ] | random }} 
 | 
					
						
							| 
									
										
										
										
											2021-03-13 22:28:49 -05:00
										 |  |  |         So I suggest wearing shorts.
 | 
					
						
							| 
									
										
										
										
											2020-12-02 22:55:11 -05:00
										 |  |  |       {% 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') %}
 | 
					
						
							| 
									
										
										
										
											2021-03-13 22:28:49 -05:00
										 |  |  |         {{ [ 'Today is a school day.',
 | 
					
						
							|  |  |  |           'Skylar has school today. '
 | 
					
						
							| 
									
										
										
										
											2020-12-12 20:50:38 -05:00
										 |  |  |         ] | random }}
 | 
					
						
							|  |  |  |         {% if states.calendar.skylar_school.attributes.description == 'digital-learning' %}
 | 
					
						
							| 
									
										
										
										
											2021-03-13 22:28:49 -05:00
										 |  |  |           But it is a digital learning day so the commute will be short.
 | 
					
						
							| 
									
										
										
										
											2020-12-12 20:50:38 -05:00
										 |  |  |         {% endif %} 
 | 
					
						
							| 
									
										
										
										
											2020-12-02 22:55:11 -05:00
										 |  |  |         {% if states.calendar.skylar_school.attributes.description == 'early-release' %}
 | 
					
						
							| 
									
										
										
										
											2021-03-13 22:28:49 -05:00
										 |  |  |           And It is early release!
 | 
					
						
							| 
									
										
										
										
											2020-12-02 22:55:11 -05:00
										 |  |  |         {% endif %}
 | 
					
						
							|  |  |  |       {% endif %}
 | 
					
						
							|  |  |  |     </p>
 | 
					
						
							|  |  |  |     <p>
 | 
					
						
							|  |  |  |       {% if states.calendar.skylar_school.attributes.offset_reached == True and is_state('calendar.school_holiday', 'off') %}
 | 
					
						
							| 
									
										
										
										
											2021-03-13 22:28:49 -05:00
										 |  |  |         {% if states.sensor.school_lunch.state == 'Nothing' %}
 | 
					
						
							|  |  |  |           Skylar will want to take his lunch today. 
 | 
					
						
							| 
									
										
										
										
											2020-12-02 22:55:11 -05:00
										 |  |  |         {% else %}
 | 
					
						
							| 
									
										
										
										
											2021-03-13 22:28:49 -05:00
										 |  |  |           Today's school lunch is {{ states.sensor.school_lunch.state }}, so he might be interested in buying his lunch.
 | 
					
						
							| 
									
										
										
										
											2020-12-02 22:55:11 -05:00
										 |  |  |         {% endif %}
 | 
					
						
							|  |  |  |       {% endif %}
 | 
					
						
							|  |  |  |     </p>
 | 
					
						
							|  |  |  |     <p>
 | 
					
						
							| 
									
										
										
										
											2020-12-12 20:50:38 -05:00
										 |  |  |       {% if is_state('input_boolean.skylar_awake', 'on') %}
 | 
					
						
							| 
									
										
										
										
											2020-12-02 22:55:11 -05:00
										 |  |  |         Skylar was up and moving at {{ states.input_datetime.skylar_awake_at.state }}.
 | 
					
						
							|  |  |  |         {% if is_state('media_player.theater_tv', 'on') %}
 | 
					
						
							|  |  |  |           and he appears to be in the Theater
 | 
					
						
							|  |  |  |         {% endif %}
 | 
					
						
							|  |  |  |       {% else %}
 | 
					
						
							|  |  |  |         It doesn't appear that Skylar is out of bed yet. 
 | 
					
						
							|  |  |  |       {% endif %}
 | 
					
						
							|  |  |  |     </p>
 | 
					
						
							|  |  |  |     <p>
 | 
					
						
							|  |  |  |       {%- if states.sensor.home_to_zoo.state|round > 50 %}
 | 
					
						
							|  |  |  |         Traffic to the Zoo appears heavy than normnal.
 | 
					
						
							|  |  |  |       {% else %}
 | 
					
						
							|  |  |  |         Traffic to the Zoo is normal.
 | 
					
						
							|  |  |  |       {% endif %}
 | 
					
						
							|  |  |  |       Currently it will take {{states.sensor.home_to_zoo.state|round}} minutes to get to the Zoo.
 | 
					
						
							|  |  |  |     </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()) -}}
 |