After Update to HA 2026.4.2 Variables in Automation not set.
HA OS is up to date!
In Automation i have set up Variables:
alias: Variablen setzen
variables:
latest: "{{ state_attr('sensor.garmin_connect_last_activities','last_activities')[0] }}"
typekey: "{{ latest.activityType }}"
id: "{{ latest.activityId }}"
km: "{{ latest.distance }}"
hrs: "{{ latest.duration }}"
kcal: "{{ latest.calories }}"
next Step i write the Variables in input Text (only to Show result)
Type: {{ typekey }}
ID: {{ id }}
km: {{ ((km | float(0)) /1000) | round(2) }}
hrs: {{ ((hrs | float(0)) /60 /60) | round(2)}}
kcal: {{ kcal }}
Result is nothing!
Now i test the same with Template:
{% set latest = state_attr('sensor.garmin_connect_last_activities', 'last_activities')[0] %}
{% set typekey = latest.activityType %}
{% set id = latest.activityId %}
{% set km = latest.distance %}
{% set hrs = latest.duration %}
{% set kcal = latest.calories %}
{{ typekey }}
{{ id }}
{{ ((km | float(0)) /1000) | round(2) }}
{{ ((hrs | float(0)) /60 /60) | round(2)}}
{{ kcal }}
Result is correct:
Anyone a Idea what is the Problem?
Every Month the same, after HA Update I’m any hours work on Fixing in HA, it’s not Funny!


