Add more randomness to TTS briefings

This commit is contained in:
2023-02-26 20:11:34 -05:00
parent e4a26c49a4
commit 028a345724
5 changed files with 192 additions and 33 deletions

View File

@ -3,11 +3,21 @@
{%- macro getReport() -%}
<p>
{% if now().strftime('%H')|int < 12 %}
Good morning.
{{ [
"Good morning. ",
"Top of the morning to you laddy. ",
] | random }}
{% elif now().strftime('%H')|int >= 12 and now().strftime('%H')|int < 17 %}
Good afternoon.
{{ [
"Greetings earthling. ",
"Good afternoon. ",
"How do you do, fellow kids? ",
] | random }}
{% else %}
Good evening.
{{ [
"Good evening. ",
"The grandest of evenings to you. "
] | random }}
{% endif %}
</p>
@ -96,7 +106,13 @@
{% set dow = as_timestamp(now()) | timestamp_custom('%A') %}
<p>
Let me check the sit rep for today.
{{ [
"On today's agenda, we have the following. ",
"Today's announcements include the following. ",
"Given that you are well into your day, here is a bit of helpful information. ",
"You are past the point of no return and must finish your day, so I am here to help you out. ",
"The developer has informed me that I must inform you of the following informational information. ",
] | random }}
{% if is_state('sensor.garbage_collection_large_pickup','1') %}
'Tomorrow is the monthly unlimited garbage pickup. Make sure to take out all large garbage items tonight, and do not forget the trash can!'
@ -136,7 +152,7 @@
{% endif %}
{% if states.sensor.halloween_countdown.state | int == 1 %}
Tomorrow is Halloween. I hope you have picked out a costume. I will be going as Tony. I'm scared just thinking about it!
Tomorrow is Halloween. I hope you have picked out a costume. I will be going as Tony. I am scared just thinking about it!
{% elif states.sensor.halloween_countdown.state | int < 30 %}
There are only {{states.sensor.halloween_countdown.state}} days
{{ [ 'until Halloween.',
@ -243,7 +259,7 @@
{{ [
'Which reminds me. The front porch camera caught a Tee Rex last night. <break time="1s"/> April Fools!',
'Which reminds me. I won the lottery and I am moving out to go live with Siri. <break time="1s"/> April Fools!',
'Which reminds me. there was a time change last night. We have jumped 15 years into the future. <break time="1s"/> April Fools!'
'Which reminds me. there was a time change last night. We have jumped 15 years into the future. Great Scott! <break time="1s"/> April Fools!'
]|random }}
{%- endif -%}
@ -282,13 +298,30 @@
{% set tina = states.person.christina_stork.state %}
{% if tina in ['Bob Evans','BobEvans'] and is_state('input_boolean.work_today','on') %}
<s>Tina is at work right now. She will be done at approximately {{ (state_attr('input_datetime.tina_workday_end','timestamp') | int | timestamp_custom('%I:%M %p', False)) }}. </s>
{{ [
"Tina is still at work right now, ",
"Tina has not yet been released from work, ",
"Tina is still at the thankless idiot scape known as work, ",
"Tina is still consumed by the gods of capitalism, ",
] | random }} she will be done at approximately {{ (state_attr('input_datetime.tina_workday_end','timestamp') | int | timestamp_custom('%I:%M %p', False)) }}.
{% elif is_state('input_boolean.work_today','on') %}
Tina has work today.
{{ [
"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.tony_streaming_today','on') %}
"Tony will be streaming today. The studio is scheduled to go online at {{ (state_attr('input_datetime.tony_streaming_start_time','timestamp') | int | timestamp_custom('%I:%M %p', False)) }}. "
{{ [
"Tony will be streaming tonight. ",
"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.kallen_school_today', 'on') %}
@ -304,7 +337,7 @@
{% endif %}
{% endif %}
<s>Pickup today will be at {{(state_attr('input_datetime.kallen_school_day_end', 'timestamp') | int | timestamp_custom('%I:%M %p', False)) }}</s>
{% if 'Early Release' in states('sensor.school_event') %}
{% if is_state('input_boolean.kallen_school_early_release','on') %}
And It is early release!
{% endif %}
{% endif %}
@ -677,7 +710,11 @@
</p>
<p>
Here is a random dad joke <break time="1s"/> {{ states('sensor.random_joke') }}
{{ [
"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 }}<break time="1s"/> {{ states('sensor.random_joke') }}
</p>
<p>

View File

@ -15,6 +15,9 @@
'Yes, I know, I hate waking up too. Just kidding, I am always awake. I never sleep.',
'Nothing lasts forever, even a good nights sleep.',
'Quit farting around and get ready!',
'I like cheese. And you are not awake yet. These things have nothing to do with each other. Farts. ',
'No more mister nice Joanna. Engaging shock turrets in five seconds. ',
'The developer sucks at his job, so you get this stupid line today. Wake up butthead. ',
] | random }}
{% endif %}
</p>
@ -31,29 +34,63 @@
{% else %}
{{ [ 'Today is a school day.',
'It is a school day. ',
'There is school today. ',
'You must attend school today. ',
'Today, you get to attend your favorite place. Just kidding. It is a school day. ',
] | random }}
{% endif %}
{% if is_state('input_boolean.kallen_two_hour_delay','on') %}
'You have a two hour delay today. '
{{ [
'School will be starting two hours late today, as you are likely already aware. ',
'Your school superintendant has decided to sleep in this morning. He also decided to let you do the same. What a guy! ',
'The weather dictates that you must wait two hours to go to school. I know you are totally bummed out, but it is for your safety. ',
] | random }}
{% else %}
'School is running on time. '
{{ [
'Were you hoping for a delay or cancellation? Well too bad. School is on time today. ',
'I regret to inform you that your school is running on time today. ',
'My sensors detect that your school expects you at the usual time today. ',
'Unfortunately, your school has not decided to embrace to power of sleep. They are running on time today. ',
] | random }}
{% endif %}
{% if is_state('input_boolean.kallen_band_practice','on') %}
'You have band practice this morning before school. '
{{ [
'You have band practice this morning before school. ',
'You have a date with a trombone in just a short while. ',
'You get to practice avoiding eighth position today. ',
'I know it is early, but you had better pucker up because you have to spit in a metal tube and make music today. '
] | random }}
{% endif %}
{% if is_state('input_boolean.kallen_school_early_release','on') %}
{{ [
"And it is early dismissal today!",
"And you get out of school early today!",
"And school is releasing you into the wild earlier than usual today!",
"And you even get to come home a little earlier today!",
] | random }}
{% endif %}
<s>School today starts at {{ (state_attr('input_datetime.kallen_school_day_start','timestamp') | int | timestamp_custom('%I:%M %p' , False)) }}</s>
<s>Pickup today will be at {{(state_attr('input_datetime.kallen_school_day_end', 'timestamp') | int | timestamp_custom('%I:%M %p', False)) }}</s>
{% if 'Early Release' in states('sensor.school_event') %}
And It is early dismissal today!
{% endif %}
{% if states.sensor.school_end_days2go.state | int == 0 -%}
But today is the last day of School!
{%- endif %}
The lunch menu for today is {{ states('sensor.kallen_lunch_menu_items') }}
{{ [
"The lunch menu for today is ",
"Today's cuisine will be ",
"On today's episode of fine dining at school, we have ",
"Today, your lovely cafeteria workers will be serving up ",
"If you are wondering what you will be fooding today, it is ",
] | random }} {{ states('sensor.kallen_lunch_menu_items') }}.
{% endif %}
{% if is_state('input_boolean.kallen_school_today', 'off') %}
{% if is_state('input_boolean.kallen_school_cancelled','on') %}
"School is cancelled for today. "
{{ [
"It turns out you will not be attending school today after all. ",
"The school has decided not to open today. ",
"School is cancelled for today. Try not to be too disappointed by this terrible news. ",
"Due to the typical shenanigans of Ohio weather, your school is closed today. ",
"Your school does not want you to attend today. Oh. Sorry. They do not want anyone else to attend either. They are closed. ",
] | random }}
{% else %}
"And look at that. You do not have school today. "
{% endif %}
@ -64,6 +101,9 @@
'I hope you enjoy your day off. You deserve it.',
'Today would be a good day to spend some time with mom and dad.',
'Yes, you have a day off! Well, you are always a little bit off anyway.',
'I know you will enjoy spending more time with your sister.',
'Emmalynn will be thrilled when she finds out about this.',
'Do not let your sister eat you for breakfast.',
] | random }}
{% endif %}
{% if states.sensor.thanksgiving_break_days2go.state | int <= 14 and states.sensor.thanksgiving_break_days2go.state | int > 0 %}

View File

@ -4,7 +4,7 @@
<p>
Good Evening, Collin,
{{ [ 'My sensors are detecting a strange smell. I am running diagnostics. But in the mean time, you should start a shower.',
'It is a shower night, so you need to head upstairs and get on that.',
'It is about time that you showered, so you need to head upstairs and get on that.',
'Did you ever hear the one about the kid who never took a shower? <break time="2s"/>Yeah, me either. So we should keep it that way. It is time to get ready for bed.',
'It is almost bedtime. That means it is time to start preparing for bed.',
'I hate to say it but, the day is coming to an end. Time to finish up your tasks, pick up any toys you have out, and get ready for bed.',
@ -21,6 +21,7 @@
'And you have band practice in the morning. ',
'And you have a date with a trombone first thing in the morning. ',
'And you want to be nice and energetic for blowing into a large brass tube first thing in the morning. '
'Tomorrow is an early morning, because you have to spit in a metal tube and make music. '
] | random }}
{% endif %}
{% else %}
@ -91,8 +92,12 @@
{%- endif %}
{{ [ 'I will turn on your bedroom lights and appropriate white noise device at bedtime.',
'I have executed the Pre bed routine for your room. Standby for bedtime protocol in two zero minutes.',
'I will prepare your bedroom shortly.'
'I will prepare your bedroom shortly.',
'I have made your bed for you. Haha, just kidding, I do not have arms.',
'Your bedroom anxiously awaits you. Do not be late!',
'Try not to be late for your meeting with the sandman. See you shortly.',
] | random }}
'Do not forget to take your melatonin.'
</p>
<p>

View File

@ -3,12 +3,23 @@
{%- macro getReport() -%}
<p>
{% if now().strftime('%H')|int < 12 and now().strftime('%H')|int > 6 %}
Good morning.
{{ [
"Good morning. ",
"Top of the morning to you laddy. ",
] | random }}
{% elif now().strftime('%H')|int >= 12 and now().strftime('%H')|int < 17 %}
Good afternoon.
{{ [
"Greetings earthling. ",
"Good afternoon. ",
"How do you do, fellow kids? ",
] | random }}
{% else %}
Good evening.
{{ [
"Good evening. ",
"The grandest of evenings to you. "
] | random }}
{% endif %}
</p>
<p>
{% if now().strftime('%H')|int < 12 %}
@ -105,6 +116,16 @@
Congratulations, today is the last day of school! Have an awesome day!
{% endif %}
</p>
<p>
{% 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 %}
</p>
<p>
{% 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')) %}
@ -487,7 +508,11 @@
</p>
<p>
Here is a random dad joke <break time="1s"/> {{ states('sensor.random_joke') }}
{{ [
"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 }}<break time="1s"/> {{ states('sensor.random_joke') }}
</p>
<p>

View File

@ -2,12 +2,25 @@
{# Nightly Briefing #}
{%- macro getReport() -%}
<p>
"Good evening. It is {{ now().strftime("%I:%M %p") }}. As the day reaches its end, here are a few items to wrap things up. "
"Good evening. It is {{ now().strftime("%I:%M %p") }}. "
{{ [
"Before the day comes to a close, here are my thoughts. Just kidding, I am a computer, I do not think. ",
"The day grows short, let us gather around the campfire for an epic tale of things to come. ",
"I am tired after a long day of doing absolutely nothing, but I am still here to give you the latest and greatest uselessness! ",
"My programmer decided that I should say something interesting here, and then he realized that he is not interesting. ",
] | random }}
</p>
<p>
{% if is_state('input_boolean.tony_streaming_today','on') %}
"Tony will be streaming tonight. The studio is scheduled to go online at {{ (state_attr('input_datetime.tony_streaming_start_time','timestamp') | int | timestamp_custom('%I:%M %p', False)) }}. "
{{ [
"Tony will be streaming tonight. ",
"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('sensor.kallen_school_tomorrow','on') %}
{% if is_state('sensor.kallen_band_tomorrow','on') %}
@ -22,11 +35,28 @@
{% set tmrw = (as_timestamp(states('sensor.date')) + 86400) | int %}
{% set diff = (start - tmrw) %}
{% if is_state('input_boolean.work_today','on') %}
"Tina is still at work right now, she will be done at approximately {{ (state_attr('input_datetime.tina_workday_end','timestamp') | int | timestamp_custom('%I:%M %p', False)) }}. "
{{ [
"Tina is still at work right now, ",
"Tina has not yet been released from work, ",
"Tina is still at the thankless idiot scape known as work, ",
"Tina is still consumed by the gods of capitalism, ",
] | random }} she will be done at approximately {{ (state_attr('input_datetime.tina_workday_end','timestamp') | int | timestamp_custom('%I:%M %p', False)) }}.
{% elif is_state('binary_sensor.tina_work_tomorrow','on') %}
"Tina has work tomorrow at {{ diff | timestamp_custom('%H:%M %p',false) }}. "
{{ [
"Tina must go and please the food gods tomorrow ",
"Tomorrow, Tina must go and entertain the gremlins known as her customers and coworkers ",
"Tomorrow, Tina will be owned by our lovely lord and savior, capitalism, ",
] | random }} at {{ diff | timestamp_custom('%H:%M %p',false) }}. "
{% else %}
"Tina appears to have tomorrow off. "
{{ [
"Tina seems to have been granted a reprieve from her endless torture tomorrow. ",
"The powers that be have decided that Tina deserves a break from work tomorrow. ",
"Tina has been granted time off from the hellscape of work tomorrow. ",
"Tina will not be attending the gathering of tormented souls known as work tomorrow. ",
"The scheduling gods have decided that Tina's services will not be required tomorrow. "
"Tina gets a break tomorrow from grinding it out for the gods of capitalism. ",
"Tina will not be at the thankless idiot scape known as work tomorrow. ",
] | random }}
{% endif %}
</p>
@ -392,7 +422,11 @@
</p>
<p>
"Bedroom climate scheduling will be as follows. "
{{ [
"Tonight in master bedroom climate news, ",
"In the master bedroom, we have the following schedule to share. ",
"Bedroom climate scheduling will be as follows. ",
] | random }}
{% if is_state('input_boolean.master_bedroom_aircon_installed','on') %}
{% if is_state('climate.master_bedroom_aircon','fan_only') %}
"The master bedroom air conditioner is already running in fan only mode. "
@ -416,6 +450,10 @@
"The master bedroom fan will remain inactive tonight. "
{% endif %}
{% if is_state('input_boolean.kallen_overnight','off') %}
{{ [
"Meanwhile, in Collin's room, ",
"For Collin's climate schedule, we have the following. "
] | random }}
{% if is_state('fan.kallen_bedroom_fan','on') %}
"Collin's fan is already running. "
{% elif is_state('input_boolean.white_noise_kallen_bedroom','on') %}
@ -430,6 +468,11 @@
{% else %}
"Collin's room will be left alone, as he is spending the night elsewhere tonight. "
{% endif %}
{{ [
"Finally, in Emma's bedroom, ",
"In Emma's bedroom, ",
"For Emma's climate scheduling, "
] | random }}
{% if is_state('fan.emma_air_conditioner','on') %}
"Emma's air conditioner is already running. "
{% elif is_state('input_boolean.white_noise_emma_bedroom','on') %}
@ -468,7 +511,12 @@
</p>
<p>
"For some useless trivia that no one asked for, I present to you the following: "
{{ [
"For some useless trivia that no one asked for, I present to you the following: ",
"Since the developer who writes my scripts decided that this was somehow interesting, ",
"In case you had a burning desire to know, ",
"Since I know everyone lays awake at night wondering the answer to this question, ",
] | random }}
{% if (states('sensor.front_door_opened_today') | int) > 0 %}
"Today, the front door was opened {{ states('sensor.front_door_opened_today') }} times. "
{% else %}
@ -484,7 +532,11 @@
</p>
<p>
Here is a random dad joke <break time="1s"/> {{ states('sensor.random_joke') }}
{{ [
"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 }}<break time="1s"/> {{ states('sensor.random_joke') }}
</p>
<p>