Hi,
I am using the entity variable in lovelance card for templating:
e.g.
type: custom:mushroom-template-card
primary: |-
{% if states(config.entity) =='off'%}
{{as_timestamp(states.switch.gh_a01_k0.last_changed)|timestamp_custom('%H:%M')}} Uhr
{%endif%}
secondary: How are you?
icon: mdi:home
entity: switch.gh_a01_k0
This code is working, but how can I use the entity variable instead of the entity name in this line?
{{as_timestamp(states.ENTITY.last_changed)|timestamp_custom('%H:%M')}} Uhr
I do not find a way to, the variable is ignored.
Spartacus