Whenever ZWavejs2Mqtt is restarted, Home Assistant/Elexa Dome Leak sensors alarm

I recently upgraded Home Assistant and am now using ZWavejs2Mqtt. I have multiple Elexa Dome Leak sensors (DMWS1). Whenever I restart ZWavejs2Mqtt, Home Assistant registers a water leak from the leak sensors. After a few moments, it clears and life goes on. The issue of course is that several actions have been triggered needlessly.

So I’ve made sure to always shutdown Home Assistant before updating ZWavejs2Mqtt, and then starting ZWavejs2Mqtt before restarting Home Assistant, but I’m thinking there must be a way to leave Home Assistant running while updating ZWavejs2Mqtt.

Suggestions?

You need to update your automations to handle the unavailable entity state. When zwavejs2mqtt is restarted, the entity state temporarily goes to unavailable until the connection with the zwave-js server is restored.

SOLVED. Thanks VERY much! I didn’t know about “unavailable” until now. I had been lazy with my automation and just had it trigger on a state change. I’ve changed it to only trigger when it goes from “off” to “on” and that issue has been solved.

Another future solution will be to use the not_from trigger field being added in the 2022.5 release. That way you can leave the from field empty and just exclude unavailable and unknown. Not really an improvement for your case where the only options would be off/on, but good for others that might have many from states.

https://rc.home-assistant.io/blog/2022/04/27/release-20225/#and-there-is-even-more

automation:
trigger:
  - platform: state
    entity_id: light.living_room
    not_from:
      - "unavailable"
      - "unknown"
    to: "on"