Trigger alarm if one door contact of a group opens

you could either do as you started and query each item of a group distinct - or you can have some Group filters and stuff:

It’s a great resource in this Design Pattern and it’ll teach you how to use Groups intelligently.