[%s] will not populate with values from .items

I have an item bound to XMBC as follows;

String XBMCState “Player state is [%s] " {xbmc=”<[loungeRoom|Player.State]"}

& on my site map set as a Text field as follows;

Text item=“XBMCState” label="Player state is [%s] " icon=“sofa”

On the web app I see the sofa icon with the label Player state is %s rather than the actual value.

The binding seems to be configured correctly and OpenHab is running. When I look in the terminal I see;

XBMCState state updated to Stop

This seems like I’m missing a fundamental understanding for this to work but I can’t put my finger on it. Please advise. Thanks.

Three things: 1) you don’t need to specify label="..." in your sitemap, if your item label is the same. 2) I’ve never seen item="XMBCState" before (where there are quotation marks around the item name. Maybe that’s OK. 3) The [%s] is not at the very end of the string in either label – you have a space before the last ". I’m pretty sure it has to be at the end of the label.

1 Like

You sir are a savior. Removed the “” on the item on the site map and removed the label= on the map as well. I was wondering why it needed to be specified twice.

1 Like

Sometimes you may want to override the label on your sitemap in some context and in others you don’t. Personally I try to use the Item label almost exclusively.