From 35e845858122689d93ca72247a437ceaa0bfa16b Mon Sep 17 00:00:00 2001 From: Tony Stork Date: Wed, 7 Sep 2022 13:38:05 -0400 Subject: [PATCH] Little bit more randomization for Welcome Home message #30 --- templates/speech/welcome_home.yaml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/templates/speech/welcome_home.yaml b/templates/speech/welcome_home.yaml index efe9966..f8c6c90 100644 --- a/templates/speech/welcome_home.yaml +++ b/templates/speech/welcome_home.yaml @@ -26,7 +26,14 @@ {% set endafter = state_attr('input_datetime.school_day_end','timestamp') + 3600 %} {% set current = ((now().hour * 60 + now().minute) * 60 ) %} {% if is_state('input_boolean.school_today_extended','on') and current > endbefore and current < endafter %} - Welcome home Kallen as well, I hope you had a great day at school! + "Welcome home Kallen as well, " + {{ [ + 'I hope you had a great day at school! ', + 'I hope school was as boring, uh I mean exciting as ever! ', + 'Hopefully your day at school was educational and fun! ', + 'Do not forget to do your homework! ', + 'You must be glad that you school day is over! ' + ] | random }} {% endif %}