to add more flexibility in terms of configuration to everyone in my house, I added a bunch of config Items which are part of specific ConfigGroup. NumberItems for ToDs or ColorItem for Scenecolors.
// Setup 1: Kitchen and Living
Group gConfigMotion_1
Color configMotionLightSetValue_1 (gConfigMotion_1)
Number configMotionLumi_1 (gConfigMotion_1)
Number configMotionStartTod_1 (gConfigMotion_1)
Number configMotionStopTod_1 (gConfigMotion_1)
Number configMotionDuration_1 (gConfigMotion_1)
But I want to use those config items in lamda functions. Therefore I need to get the right member and I thougt the best way would be members.filter, but unfortuantely I cant figure out how to use string patterns for the condition. Any Ideas?
// This is inside a lamda
val int MaxLumi = ConfigItem.members.filter[s| matches(s.name, configMotionLumi_)].state