Need help with selection from group in rule

rule "Состояние кнопок"
Item gButtons changed
gButtons.members.filter( item| item.state == ON ).forEach( item| item.postUpdate(OFF))

How i can postUpdate for all items in group gButtons but exclude only one item with name “test”?
i need something like this “gButtons.members.filter( item| != “test” )” but it doesn’t work.

gButtons.members.forEach[item | if( != "test") item.postUpdate(OFF)]

Did you mean this?

gButtons.members.filter[item| !="test"].forEach[item|item.postUpdate(OFF)]

I’m surprised that doesn’t work. I do similar things in my rules with no problems.

Thank you! Everything works as needed! Best wishes!