Turn dad jokes into a macro

This commit is contained in:
2023-04-18 17:31:35 -04:00
parent 9ad2215b12
commit 4d597a7fe8
7 changed files with 25 additions and 20 deletions

View File

@ -1,7 +1,7 @@
>
{# Nightly Briefing #}
{%- macro getReport() -%}
{% from 'speech.jinja' import greeting %}
{% from 'speech.jinja' import greeting, dadjoke %}
<p>
{{ greeting() }}
</p>
@ -266,11 +266,7 @@
</p>
<p>
{{ [
"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') }}
{{ dadjoke() }}
</p>
<p>