More briefing tweaks #97
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
{% macro greeting() %}
|
||||
{% macro greeting(date) %}
|
||||
{% if now().strftime('%H')|int < 12 %}
|
||||
{{ [
|
||||
"Good morning. ",
|
||||
@ -18,43 +18,33 @@
|
||||
"The grandest of evenings to you. "
|
||||
] | random }}
|
||||
{% endif %}
|
||||
{% if is_state('binary_sensor.morning','on') %}
|
||||
Today is {{ states('sensor.today_is') }}, {{ as_timestamp(now()) | timestamp_custom('%B %d %Y') }}.
|
||||
{% if is_state('binary_sensor.morning','on') and date == 'date' %}
|
||||
Today's date is {{ as_timestamp(now()) | timestamp_custom('%B %d %Y') }}.
|
||||
{% endif %}
|
||||
It is {{ now().strftime("%I:%M %p") }}.
|
||||
{% endmacro %}
|
||||
|
||||
{% macro greeting_nodate() %}
|
||||
{% if now().strftime('%H')|int < 12 %}
|
||||
{{ [
|
||||
"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? ",
|
||||
"Howdy partner. ",
|
||||
"Greetings, human overlords. ",
|
||||
] | random }}
|
||||
{% else %}
|
||||
{{ [
|
||||
"Good evening. ",
|
||||
"The grandest of evenings to you. "
|
||||
] | random }}
|
||||
{% endif %}
|
||||
It is {{ now().strftime("%I:%M %p") }}.
|
||||
{% macro 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 ',
|
||||
'In case you do not own a calendar, today is ',
|
||||
'If you have forgotten the order in which the week progresses, today is ',
|
||||
'Because we all forget sometimes, today is ',
|
||||
'What day is today? Oh, right, it is '
|
||||
]|random }}
|
||||
{{ states('sensor.today_is') }}.
|
||||
{% 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 ",
|
||||
"I like jokes. I particularly like stupid jokes. Here is an example ",
|
||||
"The best jokes are the dumb ones like this one ",
|
||||
"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') }}
|
||||
{% endmacro %}
|
||||
|
||||
|
@ -2,13 +2,17 @@
|
||||
{# Daily Briefing #}
|
||||
{% from 'formatting.jinja' import cleanup %}
|
||||
{%- 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 'easy_time.jinja' import count_the_days %}
|
||||
{% from 'weather.jinja' import weatherReport %}
|
||||
{% from 'sports.jinja' import sports_updates %}
|
||||
<p>
|
||||
{{ greeting() }}
|
||||
{{ greeting('date') }}
|
||||
</p>
|
||||
|
||||
<p>
|
||||
{{ today_is() }}
|
||||
</p>
|
||||
|
||||
<p>
|
||||
|
@ -2,22 +2,16 @@
|
||||
{# Morning Briefing #}
|
||||
{% from 'formatting.jinja' import cleanup %}
|
||||
{%- 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 'easy_time.jinja' import count_the_days %}
|
||||
{% from 'weather.jinja' import weatherReport %}
|
||||
{% from 'sports.jinja' import sports_updates %}
|
||||
<p>
|
||||
{{ greeting_nodate() }}
|
||||
{{ greeting('nodate') }}
|
||||
</p>
|
||||
<p>
|
||||
{{ [
|
||||
'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 }}.
|
||||
{{ today_is() }}
|
||||
</p>
|
||||
|
||||
<p>
|
||||
|
@ -9,7 +9,7 @@
|
||||
{% from 'weather.jinja' import weatherReport %}
|
||||
{% from 'sports.jinja' import sports_updates %}
|
||||
<p>
|
||||
{{ greeting() }}
|
||||
{{ greeting('date') }}
|
||||
</p>
|
||||
<p>
|
||||
{{ [
|
||||
|
Reference in New Issue
Block a user