Zwave-js: is it possible for an automation to detect when sending a command to a device failed?

My z-wave devices are fairly reliable but not always.
It sometimes happens that a device becomes unresponsive. So for example when I notice the basement is getting too humid I turn on the z-wave switch to which I’ve connected the dehumidifier. Sometimes that fails. I was wondering whether there’s a way for the automation to detect this failure?

Could not the automation simply pause for a couple of seconds and then check the state?

Thanks, I would have to do this in every automation then. I would prefer a simple automation which listens for any failure to execute a Z-wave command which can then notify me.