Zigbee wall light switch status

Hi there! Recently I have been thinking of changing my WiFi wall light switches to zigbee switches. All comes with neutral wire…

So I purchased a test zigbee wall light switch. Everything goes well. However, I realised if I power down the zigbee wall switch (means totally not connected at all), zigbee2mqttt is still showing it’s online.

I tried to change the power state in zigbee2mqttt it’s not responding (of course since the device is disconnected). But HA doesn’t detect this device is offline?

The last seen in Z2M is N/A too.

My concern is that this device doesn’t has a heart beat or reporting back the state? So HA could alert us if its offline…

I’m new to HA, let me know if I missed any settings. Thanks!

So first off you could do with knowing if your switch is a repeater or an end point (it’s most likely to be a repeater). Could also do with knowing the name of the MQTT Broker you are using and the type of Coordinator, however, this next bit might help in any event…
With Zigbee you don’t want it to be powered down at all. You want it to switch the lamp on/off but maintain power to itself at all times as it’s is going to form part of your Zigbee meshed network - It wont be able to do that if its not powered also your Zigbee mesh is going to be less than stable if you have units dropping on and off at random intervals.
With Z2M; it might not show it as offline for quite a while; remember a lot of zigbee devices conserve power by sleeping until they are needed (your’s in this case shouldn’t as its mains powered). Ultimately the offline timeout will depend on what its set at in the parameters, it could easily be set at a couple of hours.
My first port of call would be to find out why its powering down - if it’s when you manually switch the light on and off then check you have wired it up correctly.
Good luck !

The zigbee switch is an end device :frowning:

But i’m interested in the “Last Seen”. I have some sockets that are always on, and is a router. But the last seen is still N/A. Am i missing something?
image

Ah, ok, a picture paints a thousand words, I can see exactly what you mean now.
That Last Seen box is disabled by default.
If you want to change it go the the main menu on the Zigbee2mqtt UI select ‘settings’ then select ‘advanced’. About halfway down that page you’ll see a box marked ‘Last seen’ use the drop down to change it from disabled to any of the options listed. Then go to the bottom of the page and press the ‘Submit’ button.
After a few minutes you should see the last seen field start to make sense.
I assume the sockets you already have are Zigbee as well ?