More time-based Jinja2 custom templates

This commit is contained in:
2023-04-19 20:38:13 -04:00
parent ad2735d414
commit 53c0d4e86a
7 changed files with 45 additions and 28 deletions

View File

@ -1,6 +1,7 @@
>
{# Kallen School Status #}
{%- macro getReport() -%}
{% from 'time.jinja' import input_datetime_12hr %}
<p>
"Hello Collin, "
@ -20,11 +21,11 @@
{% if is_state('input_boolean.kallen_band_practice','on') %}
"You have band practice this morning before school. "
{% endif %}
"Your school day will start at {{ (state_attr('input_datetime.kallen_school_day_start','timestamp') | int | timestamp_custom('%I:%M %p' , False)) }}. "
"Your school day will start at {{ input_datetime_12hr('input_datetime.kallen_school_day_start') }}. "
{% if is_state('input_boolean.kallen_school_early_release','on') %}
"There will be early dismissal today. "
{% endif %}
"Your school day will end at {{(state_attr('input_datetime.kallen_school_day_end', 'timestamp') | int | timestamp_custom('%I:%M %p', False)) }}. "
"Your school day will end at {{ input_datetime_12hr('input_datetime.kallen_school_day_end') }}. "
{% endif %}
</p>