Offline Zigbee2MQTT device shows as online for days - SOLVED

A new SmartThings defector here…

I migrated a few dozen of the Iris 3320-L Door Sensors to HA (Zigbee2MQTT/SONOFF Zigbee 3). Couple of them went offline for unknown reason but they still appear as online on HA and show the last status (Closed/Temp value). The only way I can tell somethings is wrong is by the flatline in the temperature chart.

I took the battery out of another one as experiment and yep, it got frozen in the “Closed” state with the last temperature reading. No indication that there is a problem whatsoever.

This is really troublesome for home alarm - it wouldn’t detect door getting open while I’d believe everything is alright.

How to reliably know when door sensor is offline?

I keep reading about this - looks like Zigbe2MQTT is ignoring the timeout settings. Temperature reading is set to max 3600 seconds (1hr) and battery to 62000 (17hr). Yet it’s been dead for nearly 2 days now and even Zigbee2MQTT dashboard shows it as if everything was alright.

I found it! Turns out it’s a setting. The default behavior is to tell user that door is closed when it’s open and device has been dead for days. If you want to know the true status, you have to express that desire via changing the setting!

Zigbee2MQTT->Settings->Availability.