Rule with two conditions with two group member

Hello. I want to make rule with two conditions in IF part.
F.E

rule “дверь Прихожая”
when Member of gdoor changed from CLOSED to OPEN and Member of gsecurity changed from CLOSED to OPEN
then

the trigger will work if the item is in 2 groups, but I have error.

You can’t do AND in rule triggers.
Rule triggers are event based, and no two events ever happen in the same microsecond.

You’ll have to re-think what you want. Perhaps “if this event happens, and that condition exists”?

thank you. I solved.
if (triggeringItem.getGroupNames.contains(“gsecurity”))

That sounds like an OR condition.
You can make rule triggers in the form of

when
  Member of gdoor changed from CLOSED to OPEN or
  Member of gsecurity changed from CLOSED to OPEN
then