Script/Automation: Mode 'single' per trigger entity

Hi there,

I just started with HA and created a nice generic doobell notification script/automation that triggers if any of my Nuki Openers publish a ring event.

The automation runs a script and passes the entity_id of the Nuki Opener entity that triggered the event. So far so good…

The script must be able to run in parallel (because multiple doorbells could ring at the same time), but for a single Nuki Opener, the script should only run once at a time.

In some CI environments like e.g. GitHub Actions you can define a group-key for the concurrency group. Is there similar functionality in HA or is there a different way to achieve this?

I would like to avoid creating a separate automation/script for every Nuki Opener.