It’s not possible (without using the zha websoket API) to get the “Last Seen” value for the zigbee_devices.
So, I’d ideally like to use something like {{ device_attr(device_id('sensor.temperature'), 'last_seen') }}
to get the last time the device has reported a value (that is not the last time it has been updated or changed, as the values might be the same).
However this doesn’t seem something currently supported.
This was previously asked already in How can I read the "Last Seen" value of Zigbee device? and should be now technically possible.