Retain Flag
in Local MQTT
Hi! Would it be possible to have the retain flag set on the MQTT publication messages, so that the broker keeps the last message each time it is sent?
When restarting Home Assistant, when the sensors are first set up, they end up defaulting to unknown/unavailable if it connects to the MQTT broker between messages. I realise that is typically only 10 seconds to wait before the value is populated, but it would be nice for it to simply populate with the last value immediately.
I started setting the flag on my own messages I publish and it works well, so would be a nice addition!
Thanks for consideration - and Happy New Year!