Automation keeps in "still running ..." state

alias: Test
description: ''
trigger:
  - device_id: 2cf7b585881fd6133f3746f015affac1
    domain: zha
    platform: device
    type: remote_button_short_press
    subtype: turn_on
condition: []
action:
  - type: toggle
    device_id: c3aa5ed01b94c77dcccb570baa241d03
    entity_id: light.sonoff_01minizb_bf50c124_on_off
    domain: light
mode: queued
max: 10

PS: I tried also a blueprint for the ikea button, but that makes no difference.

1 thing you can look at is if the trigger device does a spam of commands. You could prob set a debounce to prevent that.

That would be strange. If I can without any problems trigger switch A, why would switch B behave differently?

I reused the same script, but changed the output device to an ikea switch. In this case everything seems to work fine. So the problem seems to be with the action device. However, the action device is working fine if I use the lovelace inteface.

Extremely strange. I bought a second sonoff switch, identical to the first one. If I use this switch in the automation, I have no problem at all. I removed the first switch, repaired it and gave it another name. Still same issue …

I was installing more of these sonoff switches. Again the same issue with one of them.

Were you ever able to resolve this. I am relatively new to HA and created some simple (as I thought) automations. Unfortunately one of them gets stuck in the still running state and it does not work any more till I restart HA.

id: '1684013475508'
alias: Turn ON Garage Light
description: ''
trigger:
  - platform: device
    device_id: 82f7cf5799f5ddcf17a90364f8f3f59b
    domain: cover
    entity_id: cover.garage_double
    type: opening
  - platform: device
    device_id: 411c2498d4486cb46fe02211717faae4
    domain: cover
    entity_id: cover.garage_single
    type: opening
  - platform: state
    entity_id:
      - binary_sensor.contact_garage_door
    from: 'off'
    to: 'on'
  - platform: state
    entity_id:
      - binary_sensor.contact_service_door
    from: 'on'
    to: 'off'
condition: []
action:
  - type: turn_on
    device_id: a179d18fab8ae9cf3d33b53e336f6ebc
    entity_id: switch.light_switch
    domain: switch
mode: restart

I’m also having problems with automation freezing in ‘‘still running mode’’ indefinitely.
Disabling the automation to reset it won’t work and stay active, the only way I found around this is to restart zwavejs ui at which point the automation will finally log an error and stop.
Are your automations causing problems also using z-wave devices? Are you also using z-wave js ui? The only automations that will do that on my side are the ones using z-wave devices on zwave js ui…

Same here and can’t figure out why

Simple automation that turns off a light (it’s actually a light helper group consisting of two zwave light switches) if no motion is detected by a sensor for 15 minutes. The sensor is a helper group consisting of a zwave motion sensor and a zigbee motion sensor. Sometimes it works fine, sometimes it gets hung so later ones won’t run completely due to: Stopped because only a single execution is allowed at …

alias: No Motion - Turn off shop lights
description: ''
trigger:
  - platform: state
    entity_id:
      - binary_sensor.shop_motion
    to: 'off'
    for:
      hours: 0
      minutes: 15
      seconds: 0
condition: []
action:
  - service: light.turn_off
    data: {}
    target:
      entity_id: light.shop_lights
mode: single


Same here, this issue started within the last month, and is only occurring on automations that include a zwave wall outlet. The example below you can see it hung for 310secs before I realized half the lights were still on and retriggered it manually.

@ciupol @illt678 @kramttocs
Can you join and report the issue here so it get some attention from the devs please?

1 Like

@Alain_Raymond , thanks. Indeed I’m using Zwave devices in these automations.

With Z-wave JS or Z-wave JS UI ?

Zwave js ui for me

Z-wave js ui

I can confirm that I’ve also been seeing this happen recently - automations that keep running indefinitely.

Most often if happens when I’m running automations that turn off lights for a specific floor of my house. There are a bunch of zooz zwave light switches on each floor that I’m trying to turn off. Sometimes these go unavailable (thanks 700 series stick), and I’m not sure if that’s what’s causing the automation to freeze or what. I’d rather the automation skip over the dead devices and keep going, but devices that aren’t dead won’t get turned off once the automation freezes.

This is a new behavior in the last month, and I haven’t changed these automations in a while…

1 Like

One additional comment to add… I thought maybe this had something to do with my HUSZBZ-1 zwave config and went ahead and bought a Zooz 800, but the issue still persists. Now I’m thinking it’s zwave device specific or the integration itself since it randomly started happening within the last few months.

It was occurring on ZWave JS with my old config and is still occurring now on ZWave JS UI.

One user tried it and reported that it helped to avoid the problem. Try it and let us know if it works for you.

Be advised it’s merely a workaround to avoid having the service call wait forever for a reply that never comes.

Another +1 here running into the same problem with zwave automations in the last month or so. Clearly a new bug.

I actually have this issue with my automations that are based on HUE motion sensor to turn on/off a light. Some of them get stuck after some time in the conditon section of the automation while others using the same trigger still work in parallel. Restarting HA solves the issue for some days and then I need to restart again. I have the strange feeling this is due to the fact that I check the light level in the condition section based on the light level attribute and not the state of the illuminancd device itself, but I have not yet had the time to look at it in more depth.