Need an MQTT message to show received time on dashboard

Hi there, very new to home assistant.

I’ve made a bunch of ESP32 sensors that send MQTT values, I have those sensors / values coming into HA fine with an MQTT broker in HA and displayed in a dashboard (this is all working as intended).

Some of these are binary sensors which may only change state every few days, so it would be great if on the dashboard that displays the mqtt message could also display what time the sensor message was last updated via mqtt.

I was anticipating a ‘message received’ timestamp which I can see in my mqtt explorer (windows program), which I’m not sure how to access in HA.

Thanks in advance.

I don’t think that 'message received ’ is exposed by HA.
You probably need to make a triggered template sensor with the time the message is received.

This help @jjoliver998 ?

Otherwise put this into a search engine…

site:home-assistant.io last changed sensor

Thanks both @francisp and @Sir_Goodenough

Because of my super newb status, i’m not sure where the code from the previously solved post would go. There is some implied knowledge which I don’t have.

I’m currently reading the triggers docs to see if I can deduce that from the docs.

Thanks

For reference there is secondary information available on dashboard. Thanks for all the help.