Detect online/offline state of ikea zigbee bulb

Hi guys,
I had the exactly same problem as you and I think I have found a solution… It is built into the zigbee2mqtt configuration but not available from the hassio add on config… Doesn’t require any scripts.
See https://community.home-assistant.io/t/zigbee2mqtt-light-still-showing-up-even-when-powered-off/140167