> {# Morning Briefing #} {%- macro getReport() -%}

{% if now().strftime('%H')|int < 12 and now().strftime('%H')|int > 6 %} {{ [ "Good morning. ", "Top of the morning to you laddy. ", ] | random }} {% elif now().strftime('%H')|int >= 12 and now().strftime('%H')|int < 17 %} {{ [ "Greetings earthling. ", "Good afternoon. ", "How do you do, fellow kids? ", ] | random }} {% else %} {{ [ "Good evening. ", "The grandest of evenings to you. " ] | random }} {% endif %}

{% if is_state('binary_sensor.morning','on') %}

Today is {{ states.sensor.today_is.state }}, {{ as_timestamp(now()) | timestamp_custom('%B %d %Y') }}.

{% else %}

It is {{ now().strftime("%I:%M %p") }}.

{% endif %}

{{ [ 'Today is ', 'If you have not been keeping track today is ', 'Do you know what day of the week it is? Today is', 'I hate to be the bearer of bad news, but today is ' ]|random }} {{states.sensor.today_is.state }}.

It is currently {{states.weather.iron_nerd_weather_station.state}} and {{states.sensor.pirateweather_temperature.state|round}} degrees in Defiance.

{% if is_state('input_boolean.tornado_alarm','on') %} "We are under a tornado warning. If you are not already in shelter, you should be. Get on it! " {% elif is_state('input_boolean.tornado_watch','on') %} {{ [ "There is currently a tornado watch active. Please keep an eye on the sky and your local weather reports. ", "We are currently under a tornado watch. This means the possibility exists for a tornado to form. Be prepared, and be safe! ", "The National Weather Service has issued a tornado watch for our area. Be prepared to take shelter if a warning is issued! ", ] | random }} {% endif %} {% if is_state('input_boolean.lightning_warning','on') %} {% set ltgdist = (states('sensor.blitzortung_lightning_distance') | int) / 1.609 | round %} {{ [ "There are reports of lightning in the area, please stay safe. ", "My sensors detect the presence of lightning nearby, so you should prepare to take shelter if needed. ", "A little birdy told me there is lightning nearby. His feathers were all sticking up, I have no idea why. ", "Please exercise caution, as there is lightning in the area. ", "That flashing in the sky is not interstellar warfare, it is simply lightning. But you should still be careful outside. ", ] | random }} "The nearest lightning strike is {{ ltgdist }} miles away. " {% endif %} {% if states('sensor.weatheralerts_active_alerts') > '0' %} "Currently there are weather alerts active. The total number of alerts is {{ states('sensor.weather_alerts_active_corrected') }}. They are as follows. " {{ states('sensor.weather_alert_string') }}. {% endif %} {% if (states('sensor.kdfi_visibility') | int ) < 3 %} {{ [ "It is foggy outside, please exercise caution when driving. ", "The visibility outside is quite low. If you will be driving soon, please be cautious. ", "It is pea soup outside right now, and that is just as awful to drive in as it is to eat. Be careful! ", "Look out the window. Do you notice that you cannot see anything? Bear that in mind if you intend to drive any time soon. ", "Be advised, it is very difficult to see outside right now. Drive safely. " ] | random }} {% endif %}

{{ [ 'The rest of the day should be,', 'Todays forecast should be ,' ]|random }} {{ states('sensor.current_forecast') }}

{{ states('sensor.clothing_forecast_detail') }}

{% if is_state('sensor.halloween_countdown','0') %} Happy Halloween! {% endif %} {% if is_state('sensor.christmas_countdown','0') %} Merry Christmas Everyone! {% endif %} {% if is_state('sensor.anniversary_wedding_anniversary','0') %} Happy Anniversary! It been an amazing {{ states.sensor.anniversary_wedding_anniversary.attributes.years }} years! {% endif %} {% if is_state('calendar.holidays_in_united_states', 'on') %} Today is {{states.calendar.holidays_in_united_states.attributes.message}}. {% endif %} {% if states.calendar.birthdays.state == 'on' %} Today is {{ states.calendar.birthdays.attributes.message }}! So Happy Birthday! The confetti cannon is not working otherwise I would shower you in paper garbage that someone else would have to pick up. {% endif %} {%- set event=states.calendar.national_holidays.attributes.message %} {% if 'Day' in event and 'National' in event%} {{ [ 'And a very special Happy ', 'It is also ', 'Today is also known as ', 'Oh Look. Today is ', 'Want to know a fact? Today is ', 'Everyday can be a holiday. So today is ' ]|random }} {{states.calendar.national_holidays.attributes.message | replace("&"," and ") }}. {%- endif -%}

{% if now().strftime('%Y-%m-%d') == states.input_datetime.school_last_day.state %} Congratulations, today is the last day of school! Have an awesome day! {% endif %}

{% if is_state('input_boolean.work_today','on') %} {{ [ "Tina must go and please the food gods today ", "Today, Tina must go and entertain the gremlins known as her customers and coworkers ", "Today, Tina will be owned by our lovely lord and savior, capitalism, starting ", "Tina will attempt to satiate the patron saint of capitalism today " ] | random }} at {{ (state_attr('input_datetime.tina_workday_start','timestamp') | int | timestamp_custom('%I:%M %p', False)) }}. {% endif %}

{% if is_state('input_boolean.kallen_school_today','on') and is_state('input_boolean.work_today','on') %} {% set diff = (state_attr('input_datetime.tina_workday_start','timestamp') - state_attr('input_datetime.kallen_school_day_start','timestamp')) %} {%- if states.sensor.home_to_school.state|round > 12 %} Traffic to the school appears heavier than normal. {% else %} Traffic to the school is normal. {% endif %} Currently it will take {{states.sensor.home_to_school.state|round}} minutes to get to the school. {%- if diff <= 3600 %} {%- if states.sensor.school_to_bob_evans.state|round > 15 %} Traffic from the school to Bob Evans appears heavier than normal. {% else %} Traffic from the school to Bob Evans is normal. {% endif %} Currently it will take {{states.sensor.school_to_bob_evans.state|round}} minutes to get to Bob Evans from the school. {% endif %} {% elif is_state('input_boolean.work_today','on') %} {%- if states.sensor.home_to_bob_evans.state|round > 8 %} Traffic to Bob Evans appears heavier than normal. {% else %} Traffic to Bob Evans is normal. {% endif %} Currently it will take {{states.sensor.home_to_bob_evans.state|round}} minutes to get to Bob Evans. {% elif is_state('input_boolean.kallen_school_today','on') %} {%- if states.sensor.home_to_school.state|round > 12 %} Traffic to the school appears heavier than normal. {% else %} Traffic to the school is normal. {% endif %} Currently it will take {{states.sensor.home_to_school.state|round}} minutes to get to the school. {% else %} It appears no traffic reports are needed today. Enjoy your day off! {% endif %}

{% if is_state('input_boolean.tony_streaming_today','on') %} {{ [ "Tony will be pretending to be a real content creator tonight. ", "Tony will be doing his best to defeat his impostor syndrome tonight. ", "Tony will be playing video games and yelling into a microphone tonight. ", "Tony will be scraping out the nickels and dimes tonight for the sake of entertainment. ", "Tony is not really all that funny, but tonight he will present himself to a crowd of questionable individuals who seem to think that he is. " ] | random }} The studio is scheduled to go online at {{ (state_attr('input_datetime.tony_streaming_start_time','timestamp') | int | timestamp_custom('%I:%M %p', False)) }}. " {% endif %}

{% if is_state('input_boolean.sports_updates','on') %} {% if is_state('sensor.michigan_wolverines','PRE') %} {% set date = state_attr('sensor.michigan_wolverines','date') | as_timestamp | timestamp_custom('%m-%d') %} {% if date == now().strftime('%m-%d') %} "The Michigan Wolverines will be playing today against the {{ state_attr('sensor.michigan_wolverines','opponent_name') }} at {{ state_attr('sensor.michigan_wolverines','venue') }}. " "Kickoff will be at {{ state_attr('sensor.michigan_wolverines','date') | as_timestamp | timestamp_custom('%I:%M %p') }}. " {% endif %} {% endif %} {% if is_state('sensor.ohio_state_buckeyes','PRE') %} {% if state_attr('sensor.ohio_state_buckeyes','opponent_abbr') not in ['MICH'] %} {% set date = state_attr('sensor.ohio_state_buckeyes','date') | as_timestamp | timestamp_custom('%m-%d') %} {% if date == now().strftime('%m-%d') %} "The Ohio State Buckeyes will be playing today against the {{ state_attr('sensor.ohio_state_buckeyes','opponent_name') }} at {{ state_attr('sensor.ohio_state_buckeyes','venue') }}. " "Kickoff will be at {{ state_attr('sensor.ohio_state_buckeyes','date') | as_timestamp | timestamp_custom('%I:%M %p') }}. " {% endif %} {% endif %} {% endif %} {% if is_state('sensor.toledo_rockets','PRE') %} {% if state_attr('sensor.toledo_rockets','opponent_abbr') not in ['OSU','MICH'] %} {% set date = state_attr('sensor.toledo_rockets','date') | as_timestamp | timestamp_custom('%m-%d') %} {% if date == now().strftime('%m-%d') %} "The Toledo Rockets will be playing today against the {{ state_attr('sensor.toledo_rockets','opponent_name') }} at {{ state_attr('sensor.toledo_rockets','venue') }}. " "Kickoff will be at {{ state_attr('sensor.toledo_rockets','date') | as_timestamp | timestamp_custom('%I:%M %p') }}. " {% endif %} {% endif %} {% endif %} {% if is_state('sensor.minnesota_vikings','PRE') %} {% set date = state_attr('sensor.minnesota_vikings','date') | as_timestamp | timestamp_custom('%m-%d') %} {% if date == now().strftime('%m-%d') %} "The Minnesota Vikings will be playing today against the {{ state_attr('sensor.minnesota_vikings','opponent_name') }} at {{ state_attr('sensor.minnesota_vikings','venue') }}. " "Kickoff will be at {{ state_attr('sensor.minnesota_vikings','date') | as_timestamp | timestamp_custom('%I:%M %p') }}. " {% endif %} {% endif %} {% if is_state('sensor.san_francisco_49ers','PRE') %} {% if state_attr('sensor.san_francisco_49ers','opponent_abbr') not in ['MIN'] %} {% set date = state_attr('sensor.san_francisco_49ers','date') | as_timestamp | timestamp_custom('%m-%d') %} {% if date == now().strftime('%m-%d') %} "The San Francisco 49ers will be playing today against the {{ state_attr('sensor.san_francisco_49ers','opponent_name') }} at {{ state_attr('sensor.san_francisco_49ers','venue') }}. " "Kickoff will be at {{ state_attr('sensor.san_francisco_49ers','date') | as_timestamp | timestamp_custom('%I:%M %p') }}. " {% endif %} {% endif %} {% endif %} {% if is_state('sensor.cleveland_guardians','PRE') %} {% set date = state_attr('sensor.cleveland_guardians','date') | as_timestamp | timestamp_custom('%m-%d') %} {% if date == now().strftime('%m-%d') %} "The Cleveland Guardians will be playing today against the {{ state_attr('sensor.cleveland_guardians','opponent_name') }} at {{ state_attr('sensor.cleveland_guardians','venue') }}. " "First pitch will be at {{ state_attr('sensor.cleveland_guardians','date') | as_timestamp | timestamp_custom('%I:%M %p') }}. " {% endif %} {% endif %} {% if is_state('sensor.minnesota_twins','PRE') %} {% if state_attr('sensor.minnesota_twins','opponent_abbr') not in ['CLE','LAD'] %} {% set date = state_attr('sensor.minnesota_twins','date') | as_timestamp | timestamp_custom('%m-%d') %} {% if date == now().strftime('%m-%d') %} "The Minnesota Twins will be playing today against the {{ state_attr('sensor.minnesota_twins','opponent_name') }} at {{ state_attr('sensor.minnesota_twins','venue') }}. " "First pitch will be at {{ state_attr('sensor.minnesota_twins','date') | as_timestamp | timestamp_custom('%I:%M %p') }}. " {% endif %} {% endif %} {% endif %} {% if is_state('sensor.los_angeles_dodgers','PRE') %} {% if state_attr('sensor.los_angeles_dodgers','opponent_abbr') not in ['CLE'] %} {% set date = state_attr('sensor.los_angeles_dodgers','date') | as_timestamp | timestamp_custom('%m-%d') %} {% if date == now().strftime('%m-%d') %} "The Los Angeles Dodgers will be playing today against the {{ state_attr('sensor.los_angeles_dodgers','opponent_name') }} at {{ state_attr('sensor.los_angeles_dodgers','venue') }}. " "First pitch will be at {{ state_attr('sensor.los_angeles_dodgers','date') | as_timestamp | timestamp_custom('%I:%M %p') }}. " {% endif %} {% endif %} {% endif %} {% endif %}

{% if is_state('input_boolean.sports_updates','on') %} {% if is_state('sensor.michigan_wolverines','POST') %} {% set date = state_attr('sensor.michigan_wolverines','date') | as_timestamp | timestamp_custom('%m-%d') %} {% set yday = (as_timestamp(now()) - (24*3600)) | timestamp_custom('%m-%d') %} {% if date == now().strftime('%m-%d') %} {% if (state_attr('sensor.michigan_wolverines','team_score') | int) > (state_attr('sensor.michigan_wolverines','opponent_score') | int) %} "The Michigan Wolverines won their game today against the {{ state_attr('sensor.michigan_wolverines','opponent_name') }} by a score of {{ state_attr('sensor.michigan_wolverines','team_score') }} to {{ state_attr('sensor.michigan_wolverines','opponent_score') }}. " {% else %} "The Michigan Wolverines lost their game today against the {{ state_attr('sensor.michigan_wolverines','opponent_name') }} by a score of {{ state_attr('sensor.michigan_wolverines','opponent_score') }} to {{ state_attr('sensor.michigan_wolverines','team_score') }}. " {% endif %} "This brings their record to {{ state_attr('sensor.michigan_wolverines','team_record') | replace("-"," and ") }} on the season. " {% elif yday == date %} {% if (state_attr('sensor.michigan_wolverines','team_score') | int) > (state_attr('sensor.michigan_wolverines','opponent_score') | int) %} "The Michigan Wolverines won their game yesterday against the {{ state_attr('sensor.michigan_wolverines','opponent_name') }} by a score of {{ state_attr('sensor.michigan_wolverines','team_score') }} to {{ state_attr('sensor.michigan_wolverines','opponent_score') }}. " {% else %} "The Michigan Wolverines lost their game yesterday against the {{ state_attr('sensor.michigan_wolverines','opponent_name') }} by a score of {{ state_attr('sensor.michigan_wolverines','opponent_score') }} to {{ state_attr('sensor.michigan_wolverines','team_score') }}. " {% endif %} "This brings their record to {{ state_attr('sensor.michigan_wolverines','team_record') | replace("-"," and ") }} on the season. " {% endif %} {% elif is_state('sensor.michigan_wolverines','IN') %} {% if (state_attr('sensor.michigan_wolverines','team_score') | int) > (state_attr('sensor.michigan_wolverines','opponent_score') | int) %} "The Michigan Wolverines are currently winning their game against the {{ state_attr('sensor.michigan_wolverines','opponent_name') }} with a score of {{ state_attr('sensor.michigan_wolverines','team_score') }} to {{ state_attr('sensor.michigan_wolverines','opponent_score') }}. " {% elif (state_attr('sensor.michigan_wolverines','team_score') | int) == (state_attr('sensor.michigan_wolverines','opponent_score') | int) %} "The Michigan Wolverines are currently tied in their game against the {{ state_attr('sensor.michigan_wolverines','opponent_name') }} with a score of {{ state_attr('sensor.michigan_wolverines','team_score') }} to {{ state_attr('sensor.michigan_wolverines','opponent_score') }}. " {% else %} "The Michigan Wolverines are currently losing their game against the {{ state_attr('sensor.michigan_wolverines','opponent_name') }} with a score of {{ state_attr('sensor.michigan_wolverines','opponent_score') }} to {{ state_attr('sensor.michigan_wolverines','team_score') }}. " {% endif %} {% endif %} {% if is_state('sensor.ohio_state_buckeyes','POST') %} {% if state_attr('sensor.ohio_state_buckeyes','opponent_abbr') not in ['MICH'] %} {% set date = state_attr('sensor.ohio_state_buckeyes','date') | as_timestamp | timestamp_custom('%m-%d') %} {% set yday = (as_timestamp(now()) - (24*3600)) | timestamp_custom('%m-%d') %} {% if date == now().strftime('%m-%d') %} {% if (state_attr('sensor.ohio_state_buckeyes','team_score') | int) > (state_attr('sensor.ohio_state_buckeyes','opponent_score') | int) %} "The Ohio State Buckeyes won their game today against the {{ state_attr('sensor.ohio_state_buckeyes','opponent_name') }} by a score of {{ state_attr('sensor.ohio_state_buckeyes','team_score') }} to {{ state_attr('sensor.ohio_state_buckeyes','opponent_score') }}. " {% else %} "The Ohio State Buckeyes lost their game today against the {{ state_attr('sensor.ohio_state_buckeyes','opponent_name') }} by a score of {{ state_attr('sensor.ohio_state_buckeyes','opponent_score') }} to {{ state_attr('sensor.ohio_state_buckeyes','team_score') }}. " {% endif %} "This brings their record to {{ state_attr('sensor.ohio_state_buckeyes','team_record') | replace("-"," and ") }} on the season. " {% elif yday == date %} {% if (state_attr('sensor.ohio_state_buckeyes','team_score') | int) > (state_attr('sensor.ohio_state_buckeyes','opponent_score') | int) %} "The Ohio State Buckeyes won their game yesterday against the {{ state_attr('sensor.ohio_state_buckeyes','opponent_name') }} by a score of {{ state_attr('sensor.ohio_state_buckeyes','team_score') }} to {{ state_attr('sensor.ohio_state_buckeyes','opponent_score') }}. " {% else %} "The Ohio State Buckeyes lost their game yesterday against the {{ state_attr('sensor.ohio_state_buckeyes','opponent_name') }} by a score of {{ state_attr('sensor.ohio_state_buckeyes','opponent_score') }} to {{ state_attr('sensor.ohio_state_buckeyes','team_score') }}. " {% endif %} "This brings their record to {{ state_attr('sensor.ohio_state_buckeyes','team_record') | replace("-"," and ") }} on the season. " {% endif %} {% endif %} {% elif is_state('sensor.ohio_state_buckeyes','IN') %} {% if state_attr('sensor.ohio_state_buckeyes','opponent_abbr') not in ['MICH'] %} {% if (state_attr('sensor.ohio_state_buckeyes','team_score') | int) > (state_attr('sensor.ohio_state_buckeyes','opponent_score') | int) %} "The Ohio State Buckeyes are currently winning their game against the {{ state_attr('sensor.ohio_state_buckeyes','opponent_name') }} with a score of {{ state_attr('sensor.ohio_state_buckeyes','team_score') }} to {{ state_attr('sensor.ohio_state_buckeyes','opponent_score') }}. " {% elif (state_attr('sensor.ohio_state_buckeyes','team_score') | int) == (state_attr('sensor.ohio_state_buckeyes','opponent_score') | int) %} "The Ohio State Buckeyes are currently tied in their game against the {{ state_attr('sensor.ohio_state_buckeyes','opponent_name') }} with a score of {{ state_attr('sensor.ohio_state_buckeyes','team_score') }} to {{ state_attr('sensor.ohio_state_buckeyes','opponent_score') }}. " {% else %} "The Ohio State Buckeyes are currently losing their game against the {{ state_attr('sensor.ohio_state_buckeyes','opponent_name') }} with a score of {{ state_attr('sensor.ohio_state_buckeyes','opponent_score') }} to {{ state_attr('sensor.ohio_state_buckeyes','team_score') }}. " {% endif %} {% endif %} {% endif %} {% if is_state('sensor.toledo_rockets','POST') %} {% if state_attr('sensor.toledo_rockets','opponent_abbr') not in ['OSU','MICH'] %} {% set date = state_attr('sensor.toledo_rockets','date') | as_timestamp | timestamp_custom('%m-%d') %} {% set yday = (as_timestamp(now()) - (24*3600)) | timestamp_custom('%m-%d') %} {% if date == now().strftime('%m-%d') %} {% if (state_attr('sensor.toledo_rockets','team_score') | int) > (state_attr('sensor.toledo_rockets','opponent_score') | int) %} "The Toledo Rockets won their game today against the {{ state_attr('sensor.toledo_rockets','opponent_name') }} by a score of {{ state_attr('sensor.toledo_rockets','team_score') }} to {{ state_attr('sensor.toledo_rockets','opponent_score') }}. " {% else %} "The Toledo Rockets lost their game today against the {{ state_attr('sensor.toledo_rockets','opponent_name') }} by a score of {{ state_attr('sensor.toledo_rockets','opponent_score') }} to {{ state_attr('sensor.toledo_rockets','team_score') }}. " {% endif %} "This brings their record to {{ state_attr('sensor.toledo_rockets','team_record') | replace("-"," and ") }} on the season. " {% elif yday == date %} {% if (state_attr('sensor.toledo_rockets','team_score') | int) > (state_attr('sensor.toledo_rockets','opponent_score') | int) %} "The Toledo Rockets won their game yesterday against the {{ state_attr('sensor.toledo_rockets','opponent_name') }} by a score of {{ state_attr('sensor.toledo_rockets','team_score') }} to {{ state_attr('sensor.toledo_rockets','opponent_score') }}. " {% else %} "The Toledo Rockets lost their game yesterday against the {{ state_attr('sensor.toledo_rockets','opponent_name') }} by a score of {{ state_attr('sensor.toledo_rockets','opponent_score') }} to {{ state_attr('sensor.toledo_rockets','team_score') }}. " {% endif %} "This brings their record to {{ state_attr('sensor.toledo_rockets','team_record') | replace("-"," and ") }} on the season. " {% endif %} {% endif %} {% elif is_state('sensor.toledo_rockets','IN') %} {% if state_attr('sensor.toledo_rockets','opponent_abbr') not in ['OSU','MICH'] %} {% if (state_attr('sensor.toledo_rockets','team_score') | int) > (state_attr('sensor.toledo_rockets','opponent_score') | int) %} "The Toledo Rockets are currently winning their game against the {{ state_attr('sensor.toledo_rockets','opponent_name') }} with a score of {{ state_attr('sensor.toledo_rockets','team_score') }} to {{ state_attr('sensor.toledo_rockets','opponent_score') }}. " {% elif (state_attr('sensor.toledo_rockets','team_score') | int) == (state_attr('sensor.toledo_rockets','opponent_score') | int) %} "The Toledo Rockets are currently tied in their game against the {{ state_attr('sensor.toledo_rockets','opponent_name') }} with a score of {{ state_attr('sensor.toledo_rockets','team_score') }} to {{ state_attr('sensor.toledo_rockets','opponent_score') }}. " {% else %} "The Toledo Rockets are currently losing their game against the {{ state_attr('sensor.toledo_rockets','opponent_name') }} with a score of {{ state_attr('sensor.toledo_rockets','opponent_score') }} to {{ state_attr('sensor.toledo_rockets','team_score') }}. " {% endif %} {% endif %} {% endif %} {% if is_state('sensor.minnesota_vikings','POST') %} {% set date = state_attr('sensor.minnesota_vikings','date') | as_timestamp | timestamp_custom('%m-%d') %} {% set yday = (as_timestamp(now()) - (24*3600)) | timestamp_custom('%m-%d') %} {% if date == now().strftime('%m-%d') %} {% if (state_attr('sensor.minnesota_vikings','team_score') | int) > (state_attr('sensor.minnesota_vikings','opponent_score') | int) %} "The Minnesota Vikings won their game today against the {{ state_attr('sensor.minnesota_vikings','opponent_name') }} by a score of {{ state_attr('sensor.minnesota_vikings','team_score') }} to {{ state_attr('sensor.minnesota_vikings','opponent_score') }}. " {% elif (state_attr('sensor.minnesota_vikings','team_score') | int) == state_attr('sensor.minnesota_vikings','opponent_score') | int %} "The Minnesota Vikings tied in their game today against the {{ state_attr('sensor.minnesota_vikings','opponent_name') }} by a score of {{ state_attr('sensor.minnesota_vikings','team_score') }} to {{ state_attr('sensor.minnesota_vikings','opponent_score') }}. " {% else %} "The Minnesota Vikings lost their game today against the {{ state_attr('sensor.minnesota_vikings','opponent_name') }} by a score of {{ state_attr('sensor.minnesota_vikings','opponent_score') }} to {{ state_attr('sensor.minnesota_vikings','team_score') }}. " {% endif %} "This brings their record to {{ state_attr('sensor.minnesota_vikings','team_record') | replace("-"," and ") }} on the season. " {% elif yday == date %} {% if (state_attr('sensor.minnesota_vikings','team_score') | int) > (state_attr('sensor.minnesota_vikings','opponent_score') | int) %} "The Minnesota Vikings won their game yesterday against the {{ state_attr('sensor.minnesota_vikings','opponent_name') }} by a score of {{ state_attr('sensor.minnesota_vikings','team_score') }} to {{ state_attr('sensor.minnesota_vikings','opponent_score') }}. " {% elif (state_attr('sensor.minnesota_vikings','team_score') | int) == state_attr('sensor.minnesota_vikings','opponent_score') | int %} "The Minnesota Vikings tied in their game yesterday against the {{ state_attr('sensor.minnesota_vikings','opponent_name') }} by a score of {{ state_attr('sensor.minnesota_vikings','team_score') }} to {{ state_attr('sensor.minnesota_vikings','opponent_score') }}. " {% else %} "The Minnesota Vikings lost their game yesterday against the {{ state_attr('sensor.minnesota_vikings','opponent_name') }} by a score of {{ state_attr('sensor.minnesota_vikings','opponent_score') }} to {{ state_attr('sensor.minnesota_vikings','team_score') }}. " {% endif %} "This brings their record to {{ state_attr('sensor.minnesota_vikings','team_record') | replace("-"," and ") }} on the season. " {% endif %} {% elif is_state('sensor.minnesota_vikings','IN') %} {% if (state_attr('sensor.minnesota_vikings','team_score') | int) > (state_attr('sensor.minnesota_vikings','opponent_score') | int) %} "The Minnesota Vikings are currently winning their game against the {{ state_attr('sensor.minnesota_vikings','opponent_name') }} with a score of {{ state_attr('sensor.minnesota_vikings','team_score') }} to {{ state_attr('sensor.minnesota_vikings','opponent_score') }}. " {% elif (state_attr('sensor.minnesota_vikings','team_score') | int) == (state_attr('sensor.minnesota_vikings','opponent_score') | int) %} "The Minnesota Vikings are currently tied in their game against the {{ state_attr('sensor.minnesota_vikings','opponent_name') }} with a score of {{ state_attr('sensor.minnesota_vikings','team_score') }} to {{ state_attr('sensor.minnesota_vikings','opponent_score') }}. " {% else %} "The Minnesota Vikings are currently losing their game against the {{ state_attr('sensor.minnesota_vikings','opponent_name') }} with a score of {{ state_attr('sensor.minnesota_vikings','opponent_score') }} to {{ state_attr('sensor.minnesota_vikings','team_score') }}. " {% endif %} {% endif %} {% if is_state('sensor.san_francisco_49ers','POST') %} {% if state_attr('sensor.san_francisco_49ers','opponent_abbr') not in ['MIN'] %} {% set date = state_attr('sensor.san_francisco_49ers','date') | as_timestamp | timestamp_custom('%m-%d') %} {% set yday = (as_timestamp(now()) - (24*3600)) | timestamp_custom('%m-%d') %} {% if date == now().strftime('%m-%d') %} {% if (state_attr('sensor.san_francisco_49ers','team_score') | int) > (state_attr('sensor.san_francisco_49ers','opponent_score') | int) %} "The San Francisco 49ers won their game today against the {{ state_attr('sensor.san_francisco_49ers','opponent_name') }} by a score of {{ state_attr('sensor.san_francisco_49ers','team_score') }} to {{ state_attr('sensor.san_francisco_49ers','opponent_score') }}. " {% elif (state_attr('sensor.san_francisco_49ers','team_score') | int) == state_attr('sensor.san_francisco_49ers','opponent_score') | int %} "The San Francisco 49ers tied in their game today against the {{ state_attr('sensor.san_francisco_49ers','opponent_name') }} by a score of {{ state_attr('sensor.san_francisco_49ers','team_score') }} to {{ state_attr('sensor.san_francisco_49ers','opponent_score') }}. " {% else %} "The San Francisco 49ers lost their game today against the {{ state_attr('sensor.san_francisco_49ers','opponent_name') }} by a score of {{ state_attr('sensor.san_francisco_49ers','opponent_score') }} to {{ state_attr('sensor.san_francisco_49ers','team_score') }}. " {% endif %} "This brings their record to {{ state_attr('sensor.san_francisco_49ers','team_record') | replace("-"," and ") }} on the season. " {% elif yday == date %} {% if (state_attr('sensor.san_francisco_49ers','team_score') | int) > (state_attr('sensor.san_francisco_49ers','opponent_score') | int) %} "The San Francisco 49ers won their game yesterday against the {{ state_attr('sensor.san_francisco_49ers','opponent_name') }} by a score of {{ state_attr('sensor.san_francisco_49ers','team_score') }} to {{ state_attr('sensor.san_francisco_49ers','opponent_score') }}. " {% elif (state_attr('sensor.san_francisco_49ers','team_score') | int) == state_attr('sensor.san_francisco_49ers','opponent_score') | int %} "The San Francisco 49ers tied in their game yesterday against the {{ state_attr('sensor.san_francisco_49ers','opponent_name') }} by a score of {{ state_attr('sensor.san_francisco_49ers','team_score') }} to {{ state_attr('sensor.san_francisco_49ers','opponent_score') }}. " {% else %} "The San Francisco 49ers lost their game yesterday against the {{ state_attr('sensor.san_francisco_49ers','opponent_name') }} by a score of {{ state_attr('sensor.san_francisco_49ers','opponent_score') }} to {{ state_attr('sensor.san_francisco_49ers','team_score') }}. " {% endif %} "This brings their record to {{ state_attr('sensor.san_francisco_49ers','team_record') | replace("-"," and ") }} on the season. " {% endif %} {% endif %} {% elif is_state('sensor.san_francisco_49ers','IN') %} {% if state_attr('sensor.san_francisco_49ers','opponent_abbr') not in ['MIN'] %} {% if (state_attr('sensor.san_francisco_49ers','team_score') | int) > (state_attr('sensor.san_francisco_49ers','opponent_score') | int) %} "The San Francisco 49ers are currently winning their game against the {{ state_attr('sensor.san_francisco_49ers','opponent_name') }} with a score of {{ state_attr('sensor.san_francisco_49ers','team_score') }} to {{ state_attr('sensor.san_francisco_49ers','opponent_score') }}. " {% elif (state_attr('sensor.san_francisco_49ers','team_score') | int) == (state_attr('sensor.san_francisco_49ers','opponent_score') | int) %} "The San Francisco 49ers are currently tied in their game against the {{ state_attr('sensor.san_francisco_49ers','opponent_name') }} with a score of {{ state_attr('sensor.san_francisco_49ers','team_score') }} to {{ state_attr('sensor.san_francisco_49ers','opponent_score') }}. " {% else %} "The San Francisco 49ers are currently losing their game against the {{ state_attr('sensor.san_francisco_49ers','opponent_name') }} with a score of {{ state_attr('sensor.san_francisco_49ers','opponent_score') }} to {{ state_attr('sensor.san_francisco_49ers','team_score') }}. " {% endif %} {% endif %} {% endif %} {% if is_state('sensor.cleveland_guardians','POST') %} {% set date = state_attr('sensor.cleveland_guardians','date') | as_timestamp | timestamp_custom('%m-%d') %} {% set yday = (as_timestamp(now()) - (24*3600)) | timestamp_custom('%m-%d') %} {% if date == now().strftime('%m-%d') %} {% if (state_attr('sensor.cleveland_guardians','team_score') | int) > (state_attr('sensor.cleveland_guardians','opponent_score') | int) %} "The Cleveland Guardians won their game today against the {{ state_attr('sensor.cleveland_guardians','opponent_name') }} by a score of {{ state_attr('sensor.cleveland_guardians','team_score') }} to {{ state_attr('sensor.cleveland_guardians','opponent_score') }}. " {% else %} "The Cleveland Guardians lost their game today against the {{ state_attr('sensor.cleveland_guardians','opponent_name') }} by a score of {{ state_attr('sensor.cleveland_guardians','opponent_score') }} to {{ state_attr('sensor.cleveland_guardians','team_score') }}. " {% endif %} "This brings their record to {{ state_attr('sensor.cleveland_guardians','team_record') | replace("-"," and ") }} on the season. " {% endif %} {% elif is_state('sensor.cleveland_guardians','IN') %} {% if (state_attr('sensor.cleveland_guardians','team_score') | int) > (state_attr('sensor.cleveland_guardians','opponent_score') | int) %} "The Cleveland Guardians are currently winning their game against the {{ state_attr('sensor.cleveland_guardians','opponent_name') }} with a score of {{ state_attr('sensor.cleveland_guardians','team_score') }} to {{ state_attr('sensor.cleveland_guardians','opponent_score') }}. " {% elif (state_attr('sensor.cleveland_guardians','team_score') | int) == (state_attr('sensor.cleveland_guardians','opponent_score') | int) %} "The Cleveland Guardians are currently tied in their game against the {{ state_attr('sensor.cleveland_guardians','opponent_name') }} with a score of {{ state_attr('sensor.cleveland_guardians','team_score') }} to {{ state_attr('sensor.cleveland_guardians','opponent_score') }}. " {% else %} "The Cleveland Guardians are currently losing their game against the {{ state_attr('sensor.cleveland_guardians','opponent_name') }} with a score of {{ state_attr('sensor.cleveland_guardians','opponent_score') }} to {{ state_attr('sensor.cleveland_guardians','team_score') }}. " {% endif %} {% endif %} {% if is_state('sensor.minnesota_twins','POST') %} {% if state_attr('sensor.minnesota_twins','opponent_abbr') not in ['CLE','LAD'] %} {% set date = state_attr('sensor.minnesota_twins','date') | as_timestamp | timestamp_custom('%m-%d') %} {% set yday = (as_timestamp(now()) - (24*3600)) | timestamp_custom('%m-%d') %} {% if date == now().strftime('%m-%d') %} {% if (state_attr('sensor.minnesota_twins','team_score') | int) > (state_attr('sensor.minnesota_twins','opponent_score') | int) %} "The Minnesota Twins won their game today against the {{ state_attr('sensor.minnesota_twins','opponent_name') }} by a score of {{ state_attr('sensor.minnesota_twins','team_score') }} to {{ state_attr('sensor.minnesota_twins','opponent_score') }}. " {% else %} "The Minnesota Twins lost their game today against the {{ state_attr('sensor.minnesota_twins','opponent_name') }} by a score of {{ state_attr('sensor.minnesota_twins','opponent_score') }} to {{ state_attr('sensor.minnesota_twins','team_score') }}. " {% endif %} "This brings their record to {{ state_attr('sensor.minnesota_twins','team_record') | replace("-"," and ") }} on the season. " {% endif %} {% endif %} {% elif is_state('sensor.minnesota_twins','IN') %} {% if state_attr('sensor.minnesota_twins','opponent_abbr') not in ['CLE','LAD'] %} {% if (state_attr('sensor.minnesota_twins','team_score') | int) > (state_attr('sensor.minnesota_twins','opponent_score') | int) %} "The Minnesota Twins are currently winning their game against the {{ state_attr('sensor.minnesota_twins','opponent_name') }} with a score of {{ state_attr('sensor.minnesota_twins','team_score') }} to {{ state_attr('sensor.minnesota_twins','opponent_score') }}. " {% elif (state_attr('sensor.minnesota_twins','team_score') | int) == (state_attr('sensor.minnesota_twins','opponent_score') | int) %} "The Minnesota Twins are currently tied in their game against the {{ state_attr('sensor.minnesota_twins','opponent_name') }} with a score of {{ state_attr('sensor.minnesota_twins','team_score') }} to {{ state_attr('sensor.minnesota_twins','opponent_score') }}. " {% else %} "The Minnesota Twins are currently losing their game against the {{ state_attr('sensor.minnesota_twins','opponent_name') }} with a score of {{ state_attr('sensor.minnesota_twins','opponent_score') }} to {{ state_attr('sensor.minnesota_twins','team_score') }}. " {% endif %} {% endif %} {% endif %} {% if is_state('sensor.los_angeles_dodgers','POST') %} {% if state_attr('sensor.los_angeles_dodgers','opponent_abbr') not in ['MIN'] %} {% set date = state_attr('sensor.los_angeles_dodgers','date') | as_timestamp | timestamp_custom('%m-%d') %} {% set yday = (as_timestamp(now()) - (24*3600)) | timestamp_custom('%m-%d') %} {% if date == now().strftime('%m-%d') %} {% if (state_attr('sensor.los_angeles_dodgers','team_score') | int) > (state_attr('sensor.los_angeles_dodgers','opponent_score') | int) %} "The Los Angeles Dodgers won their game today against the {{ state_attr('sensor.los_angeles_dodgers','opponent_name') }} by a score of {{ state_attr('sensor.los_angeles_dodgers','team_score') }} to {{ state_attr('sensor.los_angeles_dodgers','opponent_score') }}. " {% else %} "The Los Angeles Dodgers lost their game today against the {{ state_attr('sensor.los_angeles_dodgers','opponent_name') }} by a score of {{ state_attr('sensor.los_angeles_dodgers','opponent_score') }} to {{ state_attr('sensor.los_angeles_dodgers','team_score') }}. " {% endif %} "This brings their record to {{ state_attr('sensor.los_angeles_dodgers','team_record') | replace("-"," and ") }} on the season. " {% endif %} {% endif %} {% elif is_state('sensor.los_angeles_dodgers','IN') %} {% if state_attr('sensor.los_angeles_dodgers','opponent_abbr') not in ['MIN'] %} {% if (state_attr('sensor.los_angeles_dodgers','team_score') | int) > (state_attr('sensor.los_angeles_dodgers','opponent_score') | int) %} "The Los Angeles Dodgers are currently winning their game against the {{ state_attr('sensor.los_angeles_dodgers','opponent_name') }} with a score of {{ state_attr('sensor.los_angeles_dodgers','team_score') }} to {{ state_attr('sensor.los_angeles_dodgers','opponent_score') }}. " {% elif (state_attr('sensor.los_angeles_dodgers','team_score') | int) == (state_attr('sensor.los_angeles_dodgers','opponent_score') | int) %} "The Los Angeles Dodgers are currently tied in their game against the {{ state_attr('sensor.los_angeles_dodgers','opponent_name') }} with a score of {{ state_attr('sensor.los_angeles_dodgers','team_score') }} to {{ state_attr('sensor.los_angeles_dodgers','opponent_score') }}. " {% else %} "The Los Angeles Dodgers are currently losing their game against the {{ state_attr('sensor.los_angeles_dodgers','opponent_name') }} with a score of {{ state_attr('sensor.los_angeles_dodgers','opponent_score') }} to {{ state_attr('sensor.los_angeles_dodgers','team_score') }}. " {% endif %} {% endif %} {% endif %} {% endif %}

{{ [ "Here is a random dad joke ", "In case you hadn't had enough idiotic humor today, here is a little more ", "For further proof that the developer responsible for my existence is an idiot, I present the following joke ", ] | random }} {{ states('sensor.random_joke') }}

{% if is_state('input_boolean.briefing_extras','on') %} "And now we have the following extra information to pass along. {{ states('input_text.briefing_extras') }} " {% endif %}

{%- 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()) -}}