Unreliable triggering of z-wave switch

I’ve recently migrated my home automation system to Home Assistant and finding it great. I am running it on a RPi3.
I am, though, trying to resolve a problem with an automation that sometimes works perfectly and then sometimes doesn’t. I think it is the automation causing the problem rather than the switch (Aeotec ZWA006).
The automation is set to trigger two switches at a set time. Here is the YAML code:

description: ""
trigger:
  - platform: time
    at: "03:30:00"
condition: []
action:
  - type: turn_on
    device_id: c518c9588cda95b6820448daaaab5397
    entity_id: switch.smart_boost_timer_switch_hot_plates
    domain: switch
  - type: turn_on
    device_id: bdf840e6b417436c09fab0c9a188ca56
    entity_id: switch.smart_boost_timer_switch_2
    domain: switch
mode: single

The trace from last night shows it triggered, turned on and then turned off a second later.


and the log

The day before it did the same but the day before that it worked fine


The other switch comes on reliably.

I have a similar automation at another time of day and that seems to be working reliably.

Grateful for any advice about what might be causing the on/off “bounce”. Thanks

It looks like the command is probably failing intermittently.

Go take a look at the statistics for these devices in the zwavejs ui, that will show you if things are being timed out or failing.

You can try putting a 1-10 second delay between the commands. Sometimes I find that rapid zwave commands cause some to get missed. As for turning off, my guess is that what happened was that it never turned on (HA thought it was on since the command was sent, but then it reported back later that it was off, so HA thought it went on/off). If that’s the case, then possibly spreading out the commands will help.
-David

FWIW, I am having the same issue. As far as I can tell it started a couple of months ago The device is a Fibaro Dimmer 2. I have change the automation a couple of times and have landed on “light.turn_on” as the action. It seems better but too early to confirm.

Thanks for the suggestions. I’ve added some delays into the automation and also written a short script to check if it’s ON and pulling power and repeat the command if it’s not. It is a bit belt and braces but I’ll let it run that way and see what happens. I can’t see anything relevant in the logs but then maybe I haven’t found the right logs - they are either top level (e.g the Automation traces) or in real-time with every z-wave command on the network.