Hey there,
I’m very new to attribute mapping and I got this working the way I wanted to:
data:
datetime: >-
{{ workevents['calendar.work'].events | selectattr('summary', 'eq',
'Urlaub') | map(attribute='end') | list | first }}
Unfortunately, I’m aiming for the function to result in the ‘end’ attribute of the last list item instead of the first. Simply changing to | last gives the following error:
Error rendering data template: TypeError: ‘generator’ object is not reversible
I’m sure, it’s rather silly but I couldn’t find anything online. Thanks in advance.