Consolidate reading input datetimes into one macro

This commit is contained in:
2023-06-02 14:06:28 -04:00
parent 5e2bd6d80d
commit 6b29933088
8 changed files with 53 additions and 51 deletions

View File

@ -2,7 +2,7 @@
{# Welcome Home #}
{%- macro getReport() -%}
{% from 'speech.jinja' import dadjoke %}
{% from 'time.jinja' import input_datetime_12hr %}
{% from 'time.jinja' import input_datetime_read %}
{% from 'status.jinja' import emma_sleep %}
{% from 'easy_time.jinja' import count_the_days %}
<p>
@ -134,12 +134,12 @@
<p>
{% set tina = states.person.christina_stork.state %}
{% if tina in ['Bob Evans','BobEvans'] and is_state('input_boolean.work_today','on') %}
"Tina is at work right now. She will be done at approximately {{ input_datetime_12hr('input_datetime.tina_workday_end') }}. "
"Tina is at work right now. She will be done at approximately {{ input_datetime_read('input_datetime.tina_workday_end') }}. "
{% elif is_state('input_boolean.work_today','on') %}
"Tina has work today. "
{% endif %}
{% if is_state('input_boolean.kallen_at_school','on') %}
"Kallen is at school right now. His pickup time will be at {{ input_datetime_12hr('input_datetime.kallen_school_day_end') }}. "
"Kallen is at school right now. His pickup time will be at {{ input_datetime_read('input_datetime.kallen_school_day_end') }}. "
{% elif is_state('input_boolean.kallen_school_today','on') %}
"Kallen has school today. "
{% endif %}