Macros - get property of parameter entity?

Hello there,
is there any way to access the properties (last_changed, last_updated) from within a macro?

e.g.

{% macro time_since_text(entity_id) %}

{{states.entity_id.last_changed}}

{% endmacro %}

I need this value to calculate the time in a macro but it is not working.

{{states(entity_id)}} is working but there i have no access to the properties.

Or is it possible to match a string first to an entity and after that i can get access to the properties?

{% macro time_since_text(entity_id) %}

{{states[entity_id].last_changed}}

{% endmacro %}
1 Like

That is working, thank you.