Dear community,
I would like to filter a group by the item name, to be precise: whether an item name contains a certain string.
If this filtered group is empty, nothing should happen.
Otherwise on each of the filtered group’s elements something should happen.
I can’t get it to work, could you please support?
val jalousien = gJalousienZumLueften.members.filter[ jalousie | jalousie.name.toString.contains(raumName) ]
if( jalousien.members != null){
// Open all relevant blinds of this room
jalousien.forEach[ jalousie |
// Do something with this "jalousie"
]
}
Cheers,
Oliver