{%- macro datum(datetime, add_year=false, add_hour = false) -%}
{%- set nu = as_timestamp(datetime) %}
{%- set months = ['januari','februari','maart','april','mei','juni','juli',
'augustus','september','oktober','november','december'] -%}
{%- set wdays = ['zondag','maandag','dinsdag','woensdag','donderdag',
'vrijdag','zaterdag'] -%}
{%- set wday = nu|timestamp_custom('%w',default=none)|int(default=0) -%}
{%- set month = nu|timestamp_custom('%m',default=none)|int(default=0) -%}
{%- set datum = nu|timestamp_custom(wdays[wday] ~ ' %-d ' ~ months[month-1]) -%}
{%- set datum = datum ~ ' ' ~ datetime.year if add_year else datum -%}
{%- set datum = datum ~ ', om ' ~ datetime.hour ~ ' uur' if add_hour else datum -%}
{{- datum -}}
{%- endmacro -%}
{% from 'tijd.jinja' import datum %}
{{datum([ns.spring,ns.fall]|min,add_year=true, add_hour=true)}}
# non dst date times too
{{datum(strptime(states('sensor.afvalwijzer_next_date'),'%d-%m-%Y')|as_local, add_year=true, add_hour=true)}}
following our Discord chat, please add support for those datetimes?
https://discord.com/channels/330944238910963714/672223497736421388/1175066825042694334
this is what we talked about:
also please see your suggestion to self ;-)
https://discord.com/channels/330944238910963714/672223497736421388/1175060756652367983 fwiw, I had a custom_template all-in-1
allowing this https://discord.com/channels/330944238910963714/672223497736421388/1175030376046006312