Automation keeps in "still running ..." state

Hi all,

I am having a very strange situation. My setup:

I have ZHA configured with two switches, and one ikea remote (https://community-assets.home-assistant.io/original/3X/4/1/41c93433bfbf2f166c1841c59f11bc056b02d28f.jpeg).

I can control both switches without any problem from lovelace. As soon as I use an automation for the button, I can control switch one without any problem. However, the second switch doesn’t listen very well to the remote. I can use the remote to switch the second switch one time, and after this the whole system seems to be confused. After switching the second switch one time, I cannot control any of my switches anymore with the remote, neither from within lovelace. The whole system is unusable for approx half a minute.

Using another ikea button (shortcut button) this seems to work and the system does not “hang” for a moment.

Anyone ever experienced a similar issue?

Hi,

I found out that when everything “hangs”, the automation is in the “still running” state.

I am not sure, but could this issue be related to the Automation Modes setting?

I tried that as well. Played a bit with the different modes, but no difference …

Maybe post the automation? Right now we can only see what happens at the end, and thus only confirm its still running.

If you post the yaml code plz do so in code tags (enclosed in trippel ` )

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