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