[SOLVED] Map Transformation only on one Item

  • Platform information:

    • Hardware: RaspberryPi 4
    • openHAB version: 2.5
  • I have two Items with the sam channel. I want only that one Item transform by the map file. My configuration look like this:

String	SZ_HarmonyHub_Aktuell	"Aktuelle [MAP(harmony.map):%s]"	{channel="harmonyhub:hub:Schlafzimmer:currentActivity"}
String	SZ_HarmonyHub			"Aktuelle Aktivität"				{channel="harmonyhub:hub:Schlafzimmer:currentActivity"}

My Sitemap look this:

Switch item=SZ_HarmonyHub label="Aktuell" icon="screen"
Text item=SZ_HarmonyHub_Aktuell label="Aktuell" icon="receiver"

In the PaperUI it look like this:

How can I edit my file, that the transformation only change the text from the Item “SZ_Harmony_Aktuell” but don´t show in front of the Item “SZ_HarmonyHub”?

Tank you

Create a sitemap and use BasicUI for control. You can edit how the item is displayed in the sitemap file.

BTW, PaperUI is for configuration not control.

Sorry, I actually meant BasicUI instead of PaperUI

What’s in your map file?

To suppress state display, use an empty state format [ ] in your sitemap label or in your Item definition label
label="Aktuell []"

You don’t have to give labels in both places. If you do, the sitemap “wins”. If you don’t specify any state [format], you get the default state display.

Thank you, that was the problem.

I change the one Item to:

String	SZ_HarmonyHub	"Aktuelle Aktivität[]"	{channel="harmonyhub:hub:Schlafzimmer:currentActivity"}

And now it look like it should:

The MAP file only transform one Item instead of both.
I haven’t changed anything else.

Thank you!

The MAP transform only applied to the labels that you tell it to apply to.