[SOLVED]: MQTT availability clarification

Hi all, I’m not sure to understand how the availability topics should work in MQTT components (binary sensors, switches, etc…).
It’s clear that if HA receives a message on the related topic (availability_topic) the UI will reflect the status.

But how a non-available device might send such a topic? I cannot understand this!
I have several binary sensors connected to my radar and PIR sensors. If they lost the connection (due to loss of power, network unavailable, etc…) I want to know immediately in order to trigger a warning.

Would you mind to explain me how to know the availability of these devices?

This explains the feature: http://www.steves-internet-guide.com/mqtt-last-will-example/

2 Likes

Very clear, thank you.