From f3862f4b04cc9a732cf01fe2d7b461c46a3e8cae Mon Sep 17 00:00:00 2001 From: Tony Stork Date: Mon, 26 Sep 2022 17:59:38 -0400 Subject: [PATCH] Sensor added for if there is band practice tomorrow #45 --- sensors/time.yaml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/sensors/time.yaml b/sensors/time.yaml index 007be91..3c62dfc 100644 --- a/sensors/time.yaml +++ b/sensors/time.yaml @@ -15,6 +15,17 @@ {%- set test=(as_timestamp(now())+ (86400)) | timestamp_custom("%Y-%m-%d",true) %} {% if states.calendar.kallen_school_days.attributes.start_time == test + " 09:00:00" %} on + {% elif states.calendar.kallen_school_days.attributes.start_time == test + " 08:00:00" %} + on + {% else %} + off + {% endif %} + band_tomorrow: + friendly_name: 'Band Tomorrow' + value_template: >- + {%- set test=(as_timestamp(now())+ (86400)) | timestamp_custom("%Y-%m-%d",true) %} + {% if states.calendar.kallen_school_days.attributes.start_time == test + " 08:00:00" %} + on {% else %} off {% endif %}