MQTT Switch still enabled after client disconnected

Hello everyone. I am using the HA front end to control 8 relays connected to ESP8266 as controller. I only have one problem. The switch is the front end is still working even after I power down the ESP. Isn’t the timeout is supposed to kick in and disable the switches in front end automagically? If I publish the AVAILABLE topic to OFF manually, the front end disabled the switches correctly. I want that behavior when time out happen. How can I do that?

I don’t think there is any timeout for this in HA. The intended use would be for the other client (the esp8266 in this case) to set a Last Will and Testament (LWT) message the same as the unavailable message, and then send an available message when it starts up.