I’m hoping someone knows off the top of their head what they changed since about April '22 which broke my template sensor which is simply supposed to return a “true” if there is a calendar event in the next 2 days, and a “false” otherwise.
ValueError: Template error: strptime got invalid input '2022-09-04 13:00:00' when rendering template '{{ as_timestamp(strptime(state_attr('calendar.alena_and_seans_calendar', 'start_time'),"%F %T")) }}' but no default was specified
So I’m guessing the output from the state_attr has somehow changed it’s type/format, but I’m not sure how, so I’m not sure what to do to fix it. Anyone have any idea?
%T ISO 8601 time format (HH:MM:SS), equivalent to %H:%M:%S 14:55:02
%F Short YYYY-MM-DD date, equivalent to %Y-%m-%d 2001-08-23
default() is supposed to set the “unknown value” to my understanding. I am not very proficient in templating I must say. I think you can do … default if broken text then make fixed text…
But to be honest I would usually have to ask…
meh also tired.
your timestamp is wrong format
needs to be YYYYmmddTHHMMSSz
you needs a separator T and tz info