Improve time/date readout in TTS briefings
This commit is contained in:
@ -4,7 +4,11 @@
|
||||
<p>
|
||||
Good morning, Collin.
|
||||
|
||||
<s>It is {{ now().strftime("%I:%M %p") }}</s>
|
||||
{% if is_state('binary_sensor.morning','on') %}
|
||||
<s>Today is {{ states.sensor.today_is.state }}, {{ as_timestamp(now()) | timestamp_custom('%B %d %Y') }}.</s>
|
||||
{% else %}
|
||||
<s>It is {{ now().strftime("%I:%M %p") }}.</s>
|
||||
{% endif %}
|
||||
|
||||
{% if is_state('sensor.anniversary_kallen_s_birthday', '0') %}
|
||||
Even birthday boys have to get dressed. So get to it.
|
||||
|
@ -2,7 +2,7 @@
|
||||
{# Kallen Nightly Briefing #}
|
||||
{%- macro getReport() -%}
|
||||
<p>
|
||||
Good Evening, Collin,
|
||||
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.',
|
||||
'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.',
|
||||
|
@ -22,22 +22,14 @@
|
||||
|
||||
</p>
|
||||
<p>
|
||||
{% if now().strftime('%H')|int < 12 %}
|
||||
{% if now().strftime('%M')|int == 0 %}
|
||||
It is {{ now().strftime('%H')|int }} AM.
|
||||
{% else %}
|
||||
It is {{ now().strftime('%H')|int }} {{ now().strftime('%M')|int }} AM.
|
||||
{% endif %}
|
||||
|
||||
{% elif now().strftime('%H')|int > 12 %}
|
||||
{% if now().strftime('%M')|int == 0 %}
|
||||
It is {{ now().strftime('%H')|int }} PM.
|
||||
{% else %}
|
||||
It is {{ now().strftime('%H')|int }} {{ now().strftime('%M')|int }} PM.
|
||||
{% endif %}
|
||||
|
||||
{% if is_state('binary_sensor.morning','on') %}
|
||||
<p>
|
||||
Today is {{ states.sensor.today_is.state }}, {{ as_timestamp(now()) | timestamp_custom('%B %d %Y') }}.
|
||||
</p>
|
||||
{% else %}
|
||||
|
||||
<p>
|
||||
It is {{ now().strftime("%I:%M %p") }}.
|
||||
</p>
|
||||
{% endif %}
|
||||
</p>
|
||||
<p>
|
||||
|
@ -4,7 +4,7 @@
|
||||
<p>
|
||||
"Welcome home, "
|
||||
{% if is_state('person.tony_stork','home') and is_state('person.christina_stork','home') %}
|
||||
"Stork family."
|
||||
"Stork family. "
|
||||
{% elif is_state('person.tony_stork','home') %}
|
||||
"Tony. "
|
||||
{% elif is_state('person.christina_stork','home') %}
|
||||
@ -13,12 +13,13 @@
|
||||
"Whoever you are, Tony must have broken me again. "
|
||||
{% endif %}
|
||||
{% if now().strftime('%H')|int < 12 %}
|
||||
"I hope you're having a great morning!"
|
||||
"I hope you're having a great morning! "
|
||||
{% elif now().strftime('%H')|int >= 12 and now().strftime('%H')|int < 17 %}
|
||||
"I hope your afternoon has been a good one!"
|
||||
"I hope your afternoon has been a good one! "
|
||||
{% else %}
|
||||
"and good evening. I hope you had a good day!"
|
||||
"and good evening. I hope you had a good day! "
|
||||
{% endif %}
|
||||
"It is currently {{ now().strftime("%I:%M %p") }}."
|
||||
</p>
|
||||
|
||||
<p>
|
||||
|
Reference in New Issue
Block a user