GenericState as lambda Argument

Hi There,

i am just creating some Lambdas to fill some groups dynamicaly. My question ist now how to use give the state as an Argument to the lamdba. To be clear. This is the line of code

gAllBatteries?.members.filter(s | s.state == ON).forEach[item | gEmptyBatteries.addMember(item)]

and the question is: What type of parameter to use to transfer the ON or a CLOSE or a OPEN or a OFF to the lambda.

Thomas