From f26e48811991e2693e0e73cdb619d69659c67533 Mon Sep 17 00:00:00 2001 From: Tony Stork Date: Wed, 23 Nov 2022 14:45:49 -0500 Subject: [PATCH] Added school break countdowns to briefings --- templates/speech/daily_briefing.yaml | 24 +++++++++++++++++++ templates/speech/kallen_morning_briefing.yaml | 24 +++++++++++++++++++ templates/speech/kallen_nightly_briefing.yaml | 24 +++++++++++++++++++ 3 files changed, 72 insertions(+) diff --git a/templates/speech/daily_briefing.yaml b/templates/speech/daily_briefing.yaml index 74f855d..625a4a2 100644 --- a/templates/speech/daily_briefing.yaml +++ b/templates/speech/daily_briefing.yaml @@ -329,6 +329,30 @@ {% if is_state('input_boolean.kallen_school_cancelled','on') %} 'School has been cancelled for today. ' {% endif %} + {% if states.sensor.thanksgiving_break_days2go.state | int <= 14 and states.sensor.thanksgiving_break_days2go.state | int > 0 %} + {{ [ 'Oh, and look at that.', + 'For those trying to keep count. ', + 'In case you were wondering.', + 'Also, did you know.' + ] | random }} + There are only {{ states.sensor.thanksgiving_break_days2go.state }} days until Thanksgiving Break! + {% endif %} + {% if states.sensor.christmas_break_days2go.state | int <= 14 and states.sensor.christmas_break_days2go.state | int > 0 %} + {{ [ 'Oh, and look at that.', + 'For those trying to keep count. ', + 'In case you were wondering.', + 'Also, did you know.' + ] | random }} + There are only {{ states.sensor.christmas_break_days2go.state }} days until Christmas Break! + {% endif %} + {% if states.sensor.spring_break_days2go.state | int <= 14 and states.sensor.spring_break_days2go.state | int > 0 %} + {{ [ 'Oh, and look at that.', + 'For those trying to keep count. ', + 'In case you were wondering.', + 'Also, did you know.' + ] | random }} + There are only {{ states.sensor.spring_break_days2go.state }} days until Spring Break! + {% endif %} {% if states.sensor.school_end_days2go.state | int <= 35 and states.sensor.school_end_days2go.state | int > 0 %} {{ [ 'Oh, and look at that.', 'For those trying to keep count. ', diff --git a/templates/speech/kallen_morning_briefing.yaml b/templates/speech/kallen_morning_briefing.yaml index 099d968..f88a88b 100644 --- a/templates/speech/kallen_morning_briefing.yaml +++ b/templates/speech/kallen_morning_briefing.yaml @@ -110,6 +110,30 @@ 'Today would be a good day to spend some time with mom and dad.', ] | random }} {% endif %} + {% if states.sensor.thanksgiving_break_days2go.state | int <= 14 and states.sensor.thanksgiving_break_days2go.state | int > 0 %} + {{ [ 'Oh, and look at that.', + 'For those trying to keep count. ', + 'In case you were wondering.', + 'Also, did you know.' + ] | random }} + There are only {{ states.sensor.thanksgiving_break_days2go.state }} days until Thanksgiving Break! + {% endif %} + {% if states.sensor.christmas_break_days2go.state | int <= 14 and states.sensor.christmas_break_days2go.state | int > 0 %} + {{ [ 'Oh, and look at that.', + 'For those trying to keep count. ', + 'In case you were wondering.', + 'Also, did you know.' + ] | random }} + There are only {{ states.sensor.christmas_break_days2go.state }} days until Christmas Break! + {% endif %} + {% if states.sensor.spring_break_days2go.state | int <= 14 and states.sensor.spring_break_days2go.state | int > 0 %} + {{ [ 'Oh, and look at that.', + 'For those trying to keep count. ', + 'In case you were wondering.', + 'Also, did you know.' + ] | random }} + There are only {{ states.sensor.spring_break_days2go.state }} days until Spring Break! + {% endif %} {% if is_state ('input_boolean.school_today', 'off') and is_state('sensor.pirateweather_icon', 'snow') %} Do you wanna build a snowman? It's snowing! diff --git a/templates/speech/kallen_nightly_briefing.yaml b/templates/speech/kallen_nightly_briefing.yaml index 4ad246a..437a666 100644 --- a/templates/speech/kallen_nightly_briefing.yaml +++ b/templates/speech/kallen_nightly_briefing.yaml @@ -52,6 +52,30 @@ {% elif states.sensor.school_start_days2go.state | int == 0 -%} Tomorrow is the first day of school. Are you ready? {%- endif %} + {% if states.sensor.thanksgiving_break_days2go.state | int <= 14 and states.sensor.thanksgiving_break_days2go.state | int > 0 %} + {{ [ 'Oh, and look at that.', + 'For those trying to keep count. ', + 'In case you were wondering.', + 'Also, did you know.' + ] | random }} + There are only {{ states.sensor.thanksgiving_break_days2go.state }} days until Thanksgiving Break! + {% endif %} + {% if states.sensor.christmas_break_days2go.state | int <= 14 and states.sensor.christmas_break_days2go.state | int > 0 %} + {{ [ 'Oh, and look at that.', + 'For those trying to keep count. ', + 'In case you were wondering.', + 'Also, did you know.' + ] | random }} + There are only {{ states.sensor.christmas_break_days2go.state }} days until Christmas Break! + {% endif %} + {% if states.sensor.spring_break_days2go.state | int <= 14 and states.sensor.spring_break_days2go.state | int > 0 %} + {{ [ 'Oh, and look at that.', + 'For those trying to keep count. ', + 'In case you were wondering.', + 'Also, did you know.' + ] | random }} + There are only {{ states.sensor.spring_break_days2go.state }} days until Spring Break! + {% endif %} {% if states.sensor.school_end_days2go.state | int < 15 and states.sensor.school_end_days2go.state | int > 0 -%} {{ [ 'School is almost over for the year.', 'You have made it to the end of the school year.',