From d42bf324618d068a13f06b98ebe65fd583e0c609 Mon Sep 17 00:00:00 2001 From: Tony Stork Date: Wed, 20 Sep 2023 12:11:41 -0400 Subject: [PATCH] Move K's sleep messages to a macro Part of https://github.com/tm24fan8/HA-NerdFlows/issues/9 --- custom_templates/speech.jinja | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/custom_templates/speech.jinja b/custom_templates/speech.jinja index e0435ca..716243e 100644 --- a/custom_templates/speech.jinja +++ b/custom_templates/speech.jinja @@ -153,4 +153,29 @@ It is {{ now().strftime("%I:%M %p") }}. "What we fear doing most is usually what we need to do most.", "Be the energy you want to attract." ] | random }} +{% endmacro %} + +{% macro kallenSleepMsg() %} +{% set schedMode = states('input_select.scheduled_climate_mode_kallen_fan') %} +{% if schedMode == 'White Noise' %} +{{ [ + "No fan in Collin's room tonight. Too cold outside. Brr. Enjoy your white noise.", + "It is a little too cold for a fan tonight. I will play white noise for Collin", + "Collin will not need any help staying cool tonight. I will play white noise instead.", + "My sources are telling me that it is not fan weather tonight. White noise it is." +] | random }} Goodnight! +{% elif schedMode == 'Fan' %} +{{ [ + "Collin's fan is now on. Stay cool!", + "It is rather warm outside, so I am turning on Collin's fan.", + "To prevent an ocean of sweat from drowning us all, I have enabled Collin's fan.", + "My sensors indicate that for optimal comfort, a cooling device is needed for Collin tonight.", + "I am a fan of Collin. So I have turned on a fan for Collin." +] | random }} Goodnight! +{% else %} +{{ [ + "Lights are now on in Collin's bedroom.", + "Collin, your bedroom lights are now on." +] | random }} Goodnight! +{% endif %} {% endmacro %} \ No newline at end of file