Which automations/scripts are active?

The last few days I am messing with some automations and scripts. Some of them have delays etc.
I have noticed that the next day if I need to make a restart, I get the following message

Is there a way to find out which automation or script is active?

Restarting Home Assistant will stop all your active dashboards, automations and scripts.

image

2 Likes

Running Automations

type: custom:auto-entities
card:
  type: entities
  title: Running Automations
filter:
  exclude:
    - state: unavailable
    - attributes:
        current: '= 0'
  include:
    - domain: automation
show_empty: true
sort:
  ignore_case: true
  method: name

Running scripts

type: custom:auto-entities
card:
  type: entities
  title: Running Scripts
filter:
  exclude:
    - state: 'off'
  include:
    - domain: script
show_empty: true
sort:
  ignore_case: true
  method: name
6 Likes

That was fast! Thanks.
I found some scripts “running” although most of them were removed the same day I tried them. I deleted the entities, reloaded the scripts but I got the same message. Now I restarted HA and I hope that this will be solved.

@tom_l
edit: in general the above message is it normal. Is it something that we always get and I don’t remember it?
after the restart I am getting the same message…

Yes the warning is always shown.

1 Like

Is there a way to identify those long-running automations or scripts that may have become unresponsive? Say, any that are running >1 hour? This card works very well but I’d like to be notified of those that may have been running a very long time.

XY alert? :grin:

Something is causing the long running time, and that’s the real problem. How long are the delays? Are you using loops of some kind?

This is mainly to identify an automation that was triggered and waiting on a condition to be met before completing. This let me know if any automations continue to run after some period of time where expected conditions have not been met and allowing the automation to complete.

So you’re using wait for trigger, right?

I’ve always been dubious about that - if there’s another trigger, why not another automation? It’s a really bad idea to have automations/scripts hanging around waiting to complete.