Change ZHA Device Timeout

Is it possible to change the ‘timeout’ duration that ZHA uses to update when a device goes unavailable?

I have just switched from deCONZ to ZHA, and deCONZ updates when a device is unavailable pretty quickly. I have an automation that relies on this fact. Is there anyway to update that timeout duration in ZHA?

Yes, you can: Integrations → ZHA → Configure.
The defaults are 2hours for mains powered devices and 6hours for battery powered.

Could we have different timeouts for different device types?

For example: bulbs could go into unavailable status as soon as possible just after they are physically turned off using a wall switch, as they are not continuously plugged in.

However, the timeout for ZigBee wall switches should be higher, as they are expected to be continuously connected to the power.

It would be great if we can select two different timeout types for these kind of power-connected devices. Or, maybe, a different timeout per device to completely customize this…

You can have different timeouts for hardwired vs. battery powered devices.

Yes, but I’m talking about two hardwired device types: bulbs and others.

Bulb power can be easily turned off via the wall switch, and in that case, I’d like them to get into unavailable status after 1 or 2 minutes.

However, I have other hardwired elements in my Zigbee network that don’t establish any kind of communication for longer times, and are not expected to ever have their power supply disconnected.

That’s the reason why I’d like to be able to customize this timeout not only for hardwired vs battery powered devices, but even customize it device by device.

I am interested to know if you found a solution to this.

It can be done with zigbee2mqtt on my test HA but I run ZHA in my production and will like to have a similar setup.

For me, I want to be able to set the timeout on a device level not just for main powered and battery-powered devices.

No, I’m afraid there’s no solution yet.
I agree with you: ideally we should be able to define a different timeout value per device.

1 Like

Even better: i have a smart switch with multiple keys (also zigbee) that controls the smart bulb.

I was suprised to see its not that common

Ahm - NO, it doesn’t. Inacceptable huge default "sensor unavailable time" of 24 hours - General Support - deCONZ Community

That would be one (another?) reason to migrate away from deCONZ, it just behaves so strange sometimes…

But following the rest of this thread (and the last post before this one) I must admit: all of them (ZB2MQTT, ZHA, deCONZ) seem to struggle with the same things. So it is a “choose your issues” thing :slight_smile:

So, maybe, a sensible option would be having this timeout value configurable per device in ZHA…

I’m hitting this too.
Most of my battery devices are updating every hour or two. However, i have a few (ikea multi button and ikea motion sensor, and heimann CO sensor) that only seem to send status updates when they have a change to report. I don’t want 24/48 hours for all my battery devices, but for these it could well be appropriate

1 Like

That’s what I’m trying to figure out as well - Ikea switches that don’t ping unless pressed. It looks like Zigbee2MQTT has device based availability but not ready to migrate away from ZHA.

Playing around with the global battery availability check. Tried unsuccessfully to disable it by setting to 0. Now trying a year (31536000)

2 Likes

This would be even better if it could be set for each device individually. E.g. if you only have one particular light bulb that relies on the availability state.

I am currently trying to solve the problem by having my own automation that “polls” the light bulb by trying to turn it on. Will post here if I get it to work.

I am trying the same thing and started a post here.
I would be interested in your solution.