More time-based Jinja2 custom templates
This commit is contained in:
@ -2,6 +2,7 @@
|
||||
{# Welcome Home #}
|
||||
{%- macro getReport() -%}
|
||||
{% from 'speech.jinja' import dadjoke %}
|
||||
{% from 'time.jinja' import input_datetime_12hr %}
|
||||
<p>
|
||||
"Welcome home, "
|
||||
{% if is_state('person.tony_stork','home') and is_state('person.christina_stork','home') %}
|
||||
@ -136,12 +137,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 {{ (state_attr('input_datetime.tina_workday_end','timestamp') | int | timestamp_custom('%I:%M %p', False)) }}. "
|
||||
"Tina is at work right now. She will be done at approximately {{ input_datetime_12hr('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 {{ (state_attr('input_datetime.kallen_school_day_end','timestamp') | int | timestamp_custom('%I:%M %p', False)) }}. "
|
||||
"Kallen is at school right now. His pickup time will be at {{ input_datetime_12hr('input_datetime.kallen_school_day_end') }}. "
|
||||
{% elif is_state('input_boolean.kallen_school_today','on') %}
|
||||
"Kallen has school today. "
|
||||
{% endif %}
|
||||
|
Reference in New Issue
Block a user