OpenHab2 Sitemap Question


I use PS4 binding, I added a button labeled on \ off to my sitemap, but this is a static button that displays just text, I need to make dynamic text on / off depending on whether the prefix is turned on or off. But the text should be next to the button itself.

Add [%s] to the end of your label="..." configuration

Switch item="itemName" label="labelName [%s]"
1 Like

Thanks, it’s work

I’d recommend to add the [%s] to the .items and not to the .sitemap file. Now you have to add the [%s] every time you use the item.

1 Like

Yeah, it’s certainly personal preference. I like to keep my Items ‘internal’, and decide how I want the display to look in the Sitemap configuration. Especially as I sometimes use the same Item in different parts of my Sitemap, for slightly different reasons (and therefore use different labels).

But either way works!

1 Like

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.