If I try to take this code here:
{{ (state_attr('weather.zuhause', 'forecast')|selectattr('datetime', 'lt', (now().replace(hour=23,minute=59)).isoformat()))| map(attribute='temperature') | list | max }}
which has also been marked as a solution, I always get this error:
No aggregated item, sequence was empty.