Non-Clickable Switch on SiteMap?

Hi,

On Sitemap we can define Switch Item. However, the switch item is meant for “Status” purpose and not for user to interact with. I know that we can create an Text item on .items file to convert the switch status to text. But, i don’t think this can be done on PaperUI. Is there a way to do it on Sitemap? My intention is to minimize users to edit .items or things files directly except sitemap and PaperUI. Cheers

Hi,

Here is an example. This switch tells me if I am home or not:

.items definition:

Switch mqtt_PhoneDries_Region_Thuis  "Phone Dries [MAP(thuis.map):%s]"   						

.sitemap:

Text item=mqtt_PhoneDries_Region_Thuis	 		label="Waar is Dries?"

Transformation (thuis.map):

ON=Thuis
OFF=Weg van huis
-=-
undefined=-
uninitialized=-
NULL=-

Result:
image

thanks @Dries … but I am hopeful on Sitemap or PaparUI instead of .items

I guess you overlooked something in my reply:

The sitemap is used for BasicUI and ClassicUI, not for PaperUI (you don’t have real configuration options to influence the layout in PaperUI).

Please keep this in mind:

Paper UI is not meant for every day use. Paper UI is an administrative UI.
Paper UI is only capable to use things, and the only thing to configure is which part of the thing is displayed by linking or unlinking channels. If using any OH1 binding this will never show up in Paper UI!

1 Like

Thanks all. Got a solution. PaperUI item’s label does support [%s] just like .items.

Did you mean: { autoupdate=“false” } in item definition?