Some fixes for the daily briefing script

This commit is contained in:
2022-09-28 17:30:45 -04:00
parent 8205177f63
commit d81cfe7cf4

View File

@ -17,7 +17,7 @@
</p>
{% else %}
<p>
It is {{ now().strftime("%I:%M %p") }}
It is {{ now().strftime("%I:%M %p") }}.
</p>
{% endif %}
@ -157,6 +157,14 @@
Tomorrow is Tony and Christina's wedding anniversary!
{% endif %}
{% set tina = states.person.christina_stork.state %}
{% if tina in ['Bob Evans','BobEvans'] and is_state('input_boolean.work_today','on') %}
<s>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)) }}. </s>
{% elif is_state('input_boolean.work_today','on') %}
Tina has work today.
{% endif %}
{% else %}
{% if is_state('sensor.halloween_countdown','0') %}
Happy Halloween!
@ -268,7 +276,7 @@
{% set tina = states.person.christina_stork.state %}
{% if tina in ['Bob Evans','BobEvans'] and is_state('input_boolean.work_today','on') %}
<s>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)) }}</s>
<s>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)) }}. </s>
{% elif is_state('input_boolean.work_today','on') %}
Tina has work today.
{% endif %}