Concurrent triggerig automations (inside automation execution)

Anybody knows what happens when automation is triggered when the same automation (actions that take a long time) is executing?
The behabiour can be:

  • Not trigger the new (at all)
  • Execute the two in parallell.
  • Buffer the new one (execute the new just after the first end)
  • Break old automation (and trigger new)

And second question:
What happens if I disable automation inside actions?:
automation A
- trigger: …
-action:
- disable A (service: automation.turn_off entity_id: A)
- other actions that take a few time
- enable A (service: automation.turn_off entity_id: A)

Could be great define the concurrent behavior inside automations:

  • skip
  • paralell
  • wait
  • stop

automations will run every time a trigger is well… triggered
so they would run in parallel.
if you disable an automation, it will stop it from being run via a trigger, but if it’s already running, it will continue (t test simply disable an automation and trigger it manually)
This is why one of my favourite conditions is:

    - condition: template
      value_template: '{{ (as_timestamp(now()) - as_timestamp(states.automation.[AUTOMATION NAME].attributes.last_triggered | default(0)) | int > 300)}}'

above stops an automation from running if it ran in the last 5 min or less

1 Like

thank you. I can understand now.

1 Like