How to read the “reachable” or “last seen” state of a sensor in deconz

It seems like the deconz api exposes multiple fields like reachable or lastseen, but the integration is not passing this attribute to HA (instead it is passing the useless “on” attribute)

How can I expose those attributes?

Thank

This isn’t a direct answer to your question, but many entities have the property last_reported which is maintained by HA and is accessible using the state object method in a template:

{{ states.sensor.example_id.last_reported }}

Thanks, I am looking for the lastseen attribute since that would indicate the the device communicated with the gateweay