I am very noob with home assistant but I managed to flash a sonoff mini switch with Tasmota and connect it to HA through mqtt finally. It was a while experience but a very fun path! Besides that, I have a couple of architecture doubts.
What is the purpose of availability_topic in the switch configuration? I mean, I see using mqtt explorer how the device sends its status online through the LWT topic but, honestly, a don’t find the utility because how the device could send offline status when is being offline? Or how managed home assistant the availability status? Pinging the device or expecting updates each X seg? Or what is the purpose of this topic?
The second question is: how can I monitor the device availability status in HA? I’d like to have a card or something with all availability status of my switches (to see quickly if any is offline) and, also, notify me when any of them is offline (to replace batteries or whatever). Is it possible? Because I just have a switch entity which state is just on or off (based on the relay status) but without more properties.
I think I understand it correctly. In fact, I saw a unavailable disconnected device in my dashboard for first time after rebooting HA.
Now, my problem is that the mqtt broker updates the LWT status of the disconnected items correctly but the state is not being updated on HA correctly. I will investigate that, probably some misconfiguration or any retained messages.