From 16164f93f7d7fe9bfee6495481cae05ac24dede7 Mon Sep 17 00:00:00 2001 From: CCOSTAN Date: Wed, 18 Sep 2024 17:51:15 +0000 Subject: [PATCH] another minor update #1141 --- config/json_data/flag_days.json | 2 ++ config/packages/holiday.yaml | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/config/json_data/flag_days.json b/config/json_data/flag_days.json index d086a511..05972e3d 100755 --- a/config/json_data/flag_days.json +++ b/config/json_data/flag_days.json @@ -6,8 +6,10 @@ "6/14": "Flag Day", "7/4": "Independence Day", "7/27": "National Korean War Veterans Armistice Day", + "9/11": "Patriot Day", "9/17": "Constitution Day", "10/27": "Navy Day", + "11/11": "Veterans Day", "12/7": "Pearl Harbor Remembrance Day" }, "dynamic": { diff --git a/config/packages/holiday.yaml b/config/packages/holiday.yaml index 5729585f..4060fdf0 100755 --- a/config/packages/holiday.yaml +++ b/config/packages/holiday.yaml @@ -48,13 +48,14 @@ sensor: scan_interval: 14400 value_template: >- {%- set now_string = now().strftime('%m/%d') %} + {%- set now_full_string = now().strftime('%m/%d/%Y') %} {% set static_days = value_json.Flag_Days_US.static %} {% set dynamic_days = value_json.Flag_Days_US.dynamic %} {% if static_days is defined and now_string in static_days %} True {% elif dynamic_days is defined %} {% for day_val in dynamic_days %} - {% if day_val.date == now_string %} + {% if day_val.date == now_full_string %} True {% endif %} {% endfor %}