Zwave sending random commands?

Hi all! Looking for some guidance on how to troubleshoot some Zwave flakiness. I consider my most important automation to be water leak detection. I have leak sensors all over the house, and when any of them detects a leak, it opens the main water valve to the house (via Zwave) and sends alerts to our phones. Simple enough.

Today, we had a water leak under our dishwasher. We got the alerts on our phones, but the water didn’t turn off. Looking at the logs, I can see that it ran the automation and started to turn the water valve off, but 1 second after the “Turn off” command, it got a “turn on” command. So the valve never got to actually turn off:

The screenshot above shows that both the “turned off” and “turned on” states were triggered by the automation “Water leak”. But my automation “Water leak” does NOT have anything in there that turns on the valve. It turns it off, and then sends the commands to our phones, and that’s it.

A couple of hours later, I reset everything and put water under the same leak sensor to trigger the automation. This time, everything worked as expected. The main water valve opened and stayed open. So I proved that there isn’t some mysterious “turn back on” hidden in my automation.

I’m wondering if this has something to do with errors on the Zwave network? I looked at my Zwave controller statistics and they seem ok, but I have no experience troubleshooting this. Does anyone have any advice on how I can troubleshoot? I really need to make sure my leak detection is bulletproof.

1 error is likely unrelated
Errors are more likely to prevent function not cause function

Post the automation
It says”turned on by automation” so maybe it is unexpected condition set

Thank you for your help! Here is the automation… Do you see anything weird??


alias: Water leak
description: >-
  On water leak, turn off main water valve.  Also notify
  phones that a water leak has been detected.  Includes name of sensor that
  detected the leak.
triggers:
  - type: moist
    device_id: be0939839f313d7ff7cdd1b5882b5aab
    entity_id: ec4d571538e60069387c0b3d0477b1d7
    domain: binary_sensor
    trigger: device
  - type: moist
    device_id: 96d29d23ee045c4d4ad439059e2036bd
    entity_id: 2412efeae94c8776c878dd85a31e476d
    domain: binary_sensor
    trigger: device
  - type: moist
    device_id: cca54f34ed8b2aa9c36f7c960a4d7896
    entity_id: 1606a797530555e572ea17e3e11b616f
    domain: binary_sensor
    trigger: device
  - type: moist
    device_id: 766281098151c03b94d283b017d3ea15
    entity_id: 996edca608bbbb54fb569eaa1b1e478d
    domain: binary_sensor
    trigger: device
  - type: moist
    device_id: a760e46890d4c7079e1fada5640f28b5
    entity_id: 07c96f3b2e68af3e0c05a7abf5f666bb
    domain: binary_sensor
    trigger: device
  - type: moist
    device_id: 6429aedc6e5c81b4872ecdc2b971b656
    entity_id: 45d96e9b0f9a652963867c332fb3fea9
    domain: binary_sensor
    trigger: device
  - type: moist
    device_id: 6e506992d4431fd689fa0bb5199bb220
    entity_id: aee7c2cdcae1621d5b90010c35786b18
    domain: binary_sensor
    trigger: device
  - type: moist
    device_id: 5f0f185c1e370b048743cfd5f45f82a1
    entity_id: f1d9573d9528fc3673c8aadc33f220eb
    domain: binary_sensor
    trigger: device
  - type: moist
    device_id: f572219aac57761971946eac89b474b4
    entity_id: 3d8aa57c70a5c837ece33ea07406215e
    domain: binary_sensor
    trigger: device
  - type: moist
    device_id: c55668181688f3012ab3a824b9f3e401
    entity_id: 8d97302d3b1e8338b291a5ca3f3cdcb0
    domain: binary_sensor
    trigger: device
conditions: []
actions:
  - type: turn_off
    device_id: ea57334e02d267e6687179e6021d09db
    entity_id: 3271ba7c43c3c06d147ab9d7396a37cb
    domain: switch
  - data:
      title: WATER LEAK!!!
      message: You have a water leak! Check {{ trigger.to_state.name }}
      data:
        push:
          sound:
            name: default
            critical: 1
            volume: 0
    action: notify.mobile_app_xxx_iphone
  - data:
      title: WATER LEAK!!!
      message: You have a water leak! Check {{ trigger.to_state.name }}
      data:
        push:
          sound:
            name: default
            critical: 1
            volume: 0
    action: notify.mobile_app_yyy_iphone
mode: single