Is there a simple way to implement a LWT message in the similar way to Tasmota/SONOFF. I have several sonoff devices with Tasmota which give an online/offline message via the LWT which means if a device is out of sync or missing it shows up correctly. I would like to implement this in the code for the lights to allow me to have the correct state in Home Assistant. I have searched a number of threads on the forums but its a bit inconclusive or right at the edge of my knowledge.
Thanks in advance for any help you can give me.