The only challenge is that the room can have one or more lights, so I would like to configure a group of individual items and in the end those items shall be displayed in a list within the widget.
I think displaying shouldn’t be a problem, as far as I understand that’s what the oh-repeater component can be used.
But i cant find a way to tell the properties to allow me selecting multiple items. Does anybody have an idea?
The item context gives me:
and this gives me only the option to select one item:
This is my current configuration for that parameter
I don’t have a lot of experience with oh-repeater yet, but my understanding is you have to already have grouped the Items somehow such as in a Group, tags, metadata, etc. It also appears to support an array. But I don’t know of a way to tell it to let you select multiple Items on a property. Maybe context: group would work. I suspect that is where the widget that is displayed to select the Item is defined. I don’t see an enumeration of what values context can take though. And there is no guarantee that it returns an array usable by oh-repeater.
If group doesn’t work, you can set a tag on the Items and use itemWithTag as the source to iterate over in your oh-repeater. Or put them into a Group.
but you won’t have access to the label etc., your loop.lightItem will be the item names.
Another option is to use sourceType: itemsWithTags with the semantic tags that you defined for the relevant items and filter on the parent group (if your items are directly under the group)