Basic greeting in place

This commit is contained in:
2022-08-29 19:06:37 -04:00
parent 68545546d4
commit 2786932692

View File

@ -2,7 +2,23 @@
{# Script Name Here #}
{%- macro getReport() -%}
<p>
Oh dear, I seem to have forgotten how to welcome you home!
"Welcome home, "
{% if is_state('person.tony_stork','home') and is_state('person.christina_stork','home') %}
"Stork family. "
{% elif is_state('person.tony_stork','home') %}
"Tony. "
{% elif is_state('person.christina_stork','home') %}
"Tina. "
{% else %}
"Whoever you are, Tony must have broken me again. "
{% endif %}
{% if now().strftime('%H')|int < 12 %}
"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!"
{% else %}
"and good evening. I hope you had a good day!"
{% endif %}
</p>
{%- endmacro -%}