From 3f158d4d7b055fe32b9df2b9c3c84740d3665ceb Mon Sep 17 00:00:00 2001 From: Tony Stork Date: Thu, 1 Jun 2023 13:55:42 -0400 Subject: [PATCH] Change %I to %-I when reading time from calendar --- custom_templates/time.jinja | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom_templates/time.jinja b/custom_templates/time.jinja index a22153a..a1f61af 100644 --- a/custom_templates/time.jinja +++ b/custom_templates/time.jinja @@ -35,7 +35,7 @@ {% endmacro %} {% macro read_time_from_calendar(calendar,start_or_end) %} -{{ as_timestamp(strptime(state_attr(calendar,start_or_end), '%Y-%m-%d %H:%M:%S')) | timestamp_custom("%I:%M %p") }} +{{ as_timestamp(strptime(state_attr(calendar,start_or_end), '%Y-%m-%d %H:%M:%S')) | timestamp_custom("%-I:%M %p") }} {% endmacro %} {% macro set_datetime(hours,minutes,seconds) %}