How to ignore Zigbee 'unavailable' states, and keep the previous state?

Zigbee sometimes drops, which leads my lights and switches to report ‘unavailable’. Usually they only drop for a second or two, but this means that automations which depend on ‘time since state change’ fail consistently.

Is there a way to tell HA to just pretend ‘unavailable’ means ‘whatever the thing reported last’ (i.e. if it was off, keep saying it’s off)?

What are you using to integrate zigbee into home assistant and what devices are you using? You should fix the root cause, instead of fighting the symptoms.
I never have any zigbee device go unavailable, except if power to the device is cut or the battery is empty.

Hey, thanks for your reply.

Yeah, in retrospect I wasn’t being very clear. I was using a Conbee + deconz, with HA and deconz running in Docker.

I looked into it and it happened mostly when the server was under load. I took this as the excuse to switch to ZHA finally. Obviously it’s not been very long yet but it seems as though it’s been better.

Happy new year!