Pre-determined values for an item

Running OpenHAB3 on Windows.

I am unsure what the technical term for this is, so I hope this make sense.

How do I make pre-determined values for an item, that you can select like a Selection in sitemap. Example, for my SONOS Favorite Item, As you can see when I click the “null” from the first picture it shows all of these favorites in the second picture. I know this is linked from the SONOS Thing, and imports them SONOS itself. Is there a way that I can make set values, like (3,1=Low 3,2=Medium 3,3=High ) I know i can do this in sitemap mappings, but is there a way to link this specific for the item like shown above?

Hope this isn’t too confusing, and thanks for the help.


Basically what I want to accomplish is in my sitemap when I select for example: Group item=gFans

I want a to try and get a selection dropdown option for the Fans that all have the Text Value of Turtle.
So I can chose the pre Determined values that are linked with each item.

You are looking for the Command Options metadata. Any page where you see the Add Metadata link for an item you can click on that and select Command Options which will open up a small editor where you can enter in the label = value system you are used to with the sitemaps.

Awesome, Thanks!

Is there a way I can pre-configure this in the items file so i can just copy and paste to multiple items?

Also, I am noticing that when I try and use a comma it is not taking. Is there a certain syntax I have to use when trying to use a comma ?

My lines I want to use are:
3,0=Turtle
3,1=Low
3,2=Medium
3,3=High

but it comes out as this…

Yeah, commas are a no-go in the metadata for internal reasons. See here for a discussion and some possible options:

OK, Thanks. Ill have to make a dummy item and rule for this then!