More briefing tweaks #97
This commit is contained in:
@ -1,4 +1,4 @@
|
|||||||
{% macro greeting() %}
|
{% macro greeting(date) %}
|
||||||
{% if now().strftime('%H')|int < 12 %}
|
{% if now().strftime('%H')|int < 12 %}
|
||||||
{{ [
|
{{ [
|
||||||
"Good morning. ",
|
"Good morning. ",
|
||||||
@ -18,43 +18,33 @@
|
|||||||
"The grandest of evenings to you. "
|
"The grandest of evenings to you. "
|
||||||
] | random }}
|
] | random }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if is_state('binary_sensor.morning','on') %}
|
{% if is_state('binary_sensor.morning','on') and date == 'date' %}
|
||||||
Today is {{ states('sensor.today_is') }}, {{ as_timestamp(now()) | timestamp_custom('%B %d %Y') }}.
|
Today's date is {{ as_timestamp(now()) | timestamp_custom('%B %d %Y') }}.
|
||||||
{% endif %}
|
{% endif %}
|
||||||
It is {{ now().strftime("%I:%M %p") }}.
|
It is {{ now().strftime("%I:%M %p") }}.
|
||||||
{% endmacro %}
|
{% endmacro %}
|
||||||
|
|
||||||
{% macro greeting_nodate() %}
|
{% macro today_is() %}
|
||||||
{% if now().strftime('%H')|int < 12 %}
|
{{ [
|
||||||
{{ [
|
'Today is ',
|
||||||
"Good morning. ",
|
'If you have not been keeping track today is ',
|
||||||
"Top of the morning to you laddy. ",
|
'Do you know what day of the week it is? Today is',
|
||||||
] | random }}
|
'I hate to be the bearer of bad news, but today is ',
|
||||||
{% elif now().strftime('%H')|int >= 12 and now().strftime('%H')|int < 17 %}
|
'In case you do not own a calendar, today is ',
|
||||||
{{ [
|
'If you have forgotten the order in which the week progresses, today is ',
|
||||||
"Greetings earthling. ",
|
'Because we all forget sometimes, today is ',
|
||||||
"Good afternoon. ",
|
'What day is today? Oh, right, it is '
|
||||||
"How do you do, fellow kids? ",
|
]|random }}
|
||||||
"Howdy partner. ",
|
{{ states('sensor.today_is') }}.
|
||||||
"Greetings, human overlords. ",
|
|
||||||
] | random }}
|
|
||||||
{% else %}
|
|
||||||
{{ [
|
|
||||||
"Good evening. ",
|
|
||||||
"The grandest of evenings to you. "
|
|
||||||
] | random }}
|
|
||||||
{% endif %}
|
|
||||||
It is {{ now().strftime("%I:%M %p") }}.
|
|
||||||
{% endmacro %}
|
{% endmacro %}
|
||||||
|
|
||||||
{% macro dadjoke() %}
|
{% macro dadjoke() %}
|
||||||
{{ [
|
{{ [
|
||||||
"Here is a random dad joke ",
|
"Here is a random dad joke ",
|
||||||
"In case you hadn't had enough idiotic humor today, here is a little more ",
|
"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 ",
|
|
||||||
"I like jokes. I particularly like stupid jokes. Here is an example ",
|
|
||||||
"The best jokes are the dumb ones like this one ",
|
"The best jokes are the dumb ones like this one ",
|
||||||
"And now for todays episode of humor for morons ",
|
"And now for todays episode of humor for morons ",
|
||||||
|
"We are all dead inside, so here is another idiotic joke ",
|
||||||
] | random }}<break time="1s"/> {{ states('sensor.random_joke') }}
|
] | random }}<break time="1s"/> {{ states('sensor.random_joke') }}
|
||||||
{% endmacro %}
|
{% endmacro %}
|
||||||
|
|
||||||
|
@ -2,13 +2,17 @@
|
|||||||
{# Daily Briefing #}
|
{# Daily Briefing #}
|
||||||
{% from 'formatting.jinja' import cleanup %}
|
{% from 'formatting.jinja' import cleanup %}
|
||||||
{%- macro getReport() -%}
|
{%- macro getReport() -%}
|
||||||
{% from 'speech.jinja' import greeting, dadjoke, inspirational_quote %}
|
{% from 'speech.jinja' import greeting, dadjoke, inspirational_quote, today_is %}
|
||||||
{% from 'status.jinja' import houseStatusReport, tonyStatusReport, tinaStatusReport, kallenStatusReport, emmaStatusReport %}
|
{% from 'status.jinja' import houseStatusReport, tonyStatusReport, tinaStatusReport, kallenStatusReport, emmaStatusReport %}
|
||||||
{% from 'easy_time.jinja' import count_the_days %}
|
{% from 'easy_time.jinja' import count_the_days %}
|
||||||
{% from 'weather.jinja' import weatherReport %}
|
{% from 'weather.jinja' import weatherReport %}
|
||||||
{% from 'sports.jinja' import sports_updates %}
|
{% from 'sports.jinja' import sports_updates %}
|
||||||
<p>
|
<p>
|
||||||
{{ greeting() }}
|
{{ greeting('date') }}
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
{{ today_is() }}
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
|
@ -2,22 +2,16 @@
|
|||||||
{# Morning Briefing #}
|
{# Morning Briefing #}
|
||||||
{% from 'formatting.jinja' import cleanup %}
|
{% from 'formatting.jinja' import cleanup %}
|
||||||
{%- macro getReport() -%}
|
{%- macro getReport() -%}
|
||||||
{% from 'speech.jinja' import greeting_nodate, dadjoke, inspirational_quote %}
|
{% from 'speech.jinja' import greeting, dadjoke, inspirational_quote, today_is %}
|
||||||
{% from 'status.jinja' import tonyStatusReport, tinaStatusReport, kallenStatusReport, emmaStatusReport %}
|
{% from 'status.jinja' import tonyStatusReport, tinaStatusReport, kallenStatusReport, emmaStatusReport %}
|
||||||
{% from 'easy_time.jinja' import count_the_days %}
|
{% from 'easy_time.jinja' import count_the_days %}
|
||||||
{% from 'weather.jinja' import weatherReport %}
|
{% from 'weather.jinja' import weatherReport %}
|
||||||
{% from 'sports.jinja' import sports_updates %}
|
{% from 'sports.jinja' import sports_updates %}
|
||||||
<p>
|
<p>
|
||||||
{{ greeting_nodate() }}
|
{{ greeting('nodate') }}
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
{{ [
|
{{ today_is() }}
|
||||||
'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 }}.
|
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
{% from 'weather.jinja' import weatherReport %}
|
{% from 'weather.jinja' import weatherReport %}
|
||||||
{% from 'sports.jinja' import sports_updates %}
|
{% from 'sports.jinja' import sports_updates %}
|
||||||
<p>
|
<p>
|
||||||
{{ greeting() }}
|
{{ greeting('date') }}
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
{{ [
|
{{ [
|
||||||
|
Reference in New Issue
Block a user