From d81cfe7cf48e28bb16c6b1e985fdbb3ae79f9f71 Mon Sep 17 00:00:00 2001 From: Tony Stork Date: Wed, 28 Sep 2022 17:30:45 -0400 Subject: [PATCH] Some fixes for the daily briefing script --- templates/speech/daily_briefing.yaml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/templates/speech/daily_briefing.yaml b/templates/speech/daily_briefing.yaml index b47a932..acd1a98 100644 --- a/templates/speech/daily_briefing.yaml +++ b/templates/speech/daily_briefing.yaml @@ -17,7 +17,7 @@

{% else %}

- It is {{ now().strftime("%I:%M %p") }} + It is {{ now().strftime("%I:%M %p") }}.

{% endif %} @@ -156,6 +156,14 @@ {% if states.sensor.anniversary_wedding_anniversary.state | int == 1 %} 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') %} + 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)) }}. + {% elif is_state('input_boolean.work_today','on') %} + Tina has work today. + {% endif %} + {% else %} {% if is_state('sensor.halloween_countdown','0') %} @@ -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') %} - 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 {{ (state_attr('input_datetime.tina_workday_end','timestamp') | int | timestamp_custom('%I:%M %p', False)) }}. {% elif is_state('input_boolean.work_today','on') %} Tina has work today. {% endif %}