diff --git a/custom_templates/speech.jinja b/custom_templates/speech.jinja
index 18b7ddd..f57d2be 100644
--- a/custom_templates/speech.jinja
+++ b/custom_templates/speech.jinja
@@ -41,4 +41,12 @@ It is {{ now().strftime("%I:%M %p") }}.
] | random }}
{% endif %}
It is {{ now().strftime("%I:%M %p") }}.
+{% endmacro %}
+
+{% macro dadjoke() %}
+{{ [
+"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 }}
{{ greeting() }}
@@ -432,11 +432,7 @@
- {{ [
- "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 }}
diff --git a/templates/speech/kallen_morning_briefing.yaml b/templates/speech/kallen_morning_briefing.yaml index ef24ca9..c8ec394 100644 --- a/templates/speech/kallen_morning_briefing.yaml +++ b/templates/speech/kallen_morning_briefing.yaml @@ -2,6 +2,7 @@ {# Kallen Morning Briefing #} {%- macro getReport() -%} {% from 'time.jinja' import current_time_12hr, current_date_readout %} + {% from 'speech.jinja' import dadjoke %}
Good morning, Collin. @@ -158,6 +159,12 @@
++ {% if is_state('input_boolean.kallen_school_today','off') %} + {{ dadjoke() }} + {% endif %} +
+{% if is_state('input_boolean.kallen_briefing_extras','on') %} "And now we have the following extra information to pass along. {{ states('input_text.kallen_briefing_extras') }} " diff --git a/templates/speech/kallen_nightly_briefing.yaml b/templates/speech/kallen_nightly_briefing.yaml index 3b72c1c..ca264c1 100644 --- a/templates/speech/kallen_nightly_briefing.yaml +++ b/templates/speech/kallen_nightly_briefing.yaml @@ -1,6 +1,7 @@ > {# Kallen Nightly Briefing #} {%- macro getReport() -%} + {% from 'speech.jinja' import dadjoke %}
Good Evening, Collin, it is currently {{ now().strftime("%I:%M %p") }}. {{ [ 'My sensors are detecting a strange smell. I am running diagnostics. But in the mean time, you should start a shower.', @@ -112,7 +113,7 @@
- Just for you, here is a random dad joke
diff --git a/templates/speech/morning_briefing.yaml b/templates/speech/morning_briefing.yaml index c25a947..990f497 100644 --- a/templates/speech/morning_briefing.yaml +++ b/templates/speech/morning_briefing.yaml @@ -1,7 +1,7 @@ > {# Morning Briefing #} {%- macro getReport() -%} - {% from 'speech.jinja' import greeting_nodate %} + {% from 'speech.jinja' import greeting_nodate, dadjoke %}
{{ greeting_nodate() }}
@@ -214,11 +214,7 @@
- {{ [
- "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 }}
diff --git a/templates/speech/nightly_briefing.yaml b/templates/speech/nightly_briefing.yaml index f18a269..40aee86 100644 --- a/templates/speech/nightly_briefing.yaml +++ b/templates/speech/nightly_briefing.yaml @@ -1,7 +1,7 @@ > {# Nightly Briefing #} {%- macro getReport() -%} - {% from 'speech.jinja' import greeting %} + {% from 'speech.jinja' import greeting, dadjoke %}
{{ greeting() }}
@@ -266,11 +266,7 @@
- {{ [
- "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 }}
diff --git a/templates/speech/welcome_home.yaml b/templates/speech/welcome_home.yaml index e6c8083..481e8eb 100644 --- a/templates/speech/welcome_home.yaml +++ b/templates/speech/welcome_home.yaml @@ -1,6 +1,7 @@ > {# Welcome Home #} {%- macro getReport() -%} + {% from 'speech.jinja' import dadjoke %}
"Welcome home, " {% if is_state('person.tony_stork','home') and is_state('person.christina_stork','home') %} @@ -147,7 +148,7 @@
- Here is a random dad joke