From 02d65c4192fdc013d3c19d7cfe38a232a7c097c0 Mon Sep 17 00:00:00 2001 From: Tony Stork Date: Mon, 26 Sep 2022 18:00:40 -0400 Subject: [PATCH] Fixed wife's presence detection for briefings --- templates/speech/daily_briefing.yaml | 3 ++- templates/speech/welcome_home.yaml | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/templates/speech/daily_briefing.yaml b/templates/speech/daily_briefing.yaml index cc0d45d..b47a932 100644 --- a/templates/speech/daily_briefing.yaml +++ b/templates/speech/daily_briefing.yaml @@ -266,7 +266,8 @@ {%- endif -%} {%- endif -%} - {% if is_state('person.christina_stork','Bob Evans') and is_state('input_boolean.work_today','on') %} + {% 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. diff --git a/templates/speech/welcome_home.yaml b/templates/speech/welcome_home.yaml index 76b21db..e4f9ddb 100644 --- a/templates/speech/welcome_home.yaml +++ b/templates/speech/welcome_home.yaml @@ -131,7 +131,8 @@

- {% if is_state('person.christina_stork','Bob Evans') and is_state('input_boolean.work_today','on') %} + {% 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. "