How to use device online/offline state with Z2M?

Hi, i’m new to Z2M (used ZHA before) and wonder how i can see the devices online-state?
I’ve tried to do it with this settings

but even a device where the battery is removed since 24h is shown as “Online”

I would say that 30 minutes is going to cause you problems. Most end devices (passive) check in hourly, some only every 2 or three hours. You’re going to constantly see devices flipping between available and unavailable.

What may help is enabling last seen, this will let you easily see when a device last checked in.

Thank you for the suggestion, i’ve changed the availability timeout for battery driven devices to 6 hours.

Using “last seen” seems to work:


I used these settings:

What are those checkboxes ment for? I’ve just checked them without knowing what they are used for.

The Z2M docs have a search feature :wink:

https://www.zigbee2mqtt.io/guide/usage/mqtt_topics_and_messages.html#zigbee2mqtt-bridge-state
https://www.zigbee2mqtt.io/guide/usage/mqtt_topics_and_messages.html#mqtt-topics-and-messages