How to set a TTN Application to retain the last MQTT message?

I have a LoRaWAn park sensor on my garage that send a payload to TTN if the car get in ou get out from it.
In this case a message is imediatly sent to indicates these events.
The sensosr is configured to send heartbeats each 30 minutes in the car stay here ou out of here, for example, for five hours.
When I start my MQTT client on PC or shmatphone I wait sometimes so much time for a harthbeat.
How can I configure in Application => Payload Format => function Decoder to set “retain” flag on MQTT message?

You can’t. If you need persistent state you need to think of another solution.

MQTT is a transport protocol which normally talks to something rather than be the thing that tells you the status.

You could switch over to HTTP Integration and then have a very simple web page with a log of entries on it.

Hi, Kersing,

Thanks for reply.

Hi Descartes,
I´l try about your suggestion. Thanks.