[SOLVED] Sitemap implementation of Number item

Hi all,

I have implemented this rule for my washing machine and it works just fine. Bu I can’t get the current state of the washing machine displayed as nicely as in the linked post.
It is a Number iten and I have only been able to implement it as a Selection or Switch with text mappings, both of which is not pretty and could even be changed via the sitemap.

How do I display Washingmachine_OpState values 0 to 3 as nice texts as in the OP? Maybe even with the little symbols?

Use the Text element with a Map transformation.

1 Like

I tried the Text items with mappings in the sitemap, but that didn’t work. Thanks!

Then show what didn’t work because that is the way to do it.

Text item=SD_Jis1_Waschmaschine_Status mappings=[0="Aus",1="Aktiv",2="Fertig"]

does not work, it produces the log entry:

2019-12-06 22:03:57.185 [WARN ] [el.core.internal.ModelRepositoryImpl] - Configuration model 'test.sitemap' has errors, therefore ignoring it: [62,52]: mismatched input 'mappings=[' expecting '}'

[66,5]: missing EOF at 'Frame'

Replacing Text with Selection or Switch works but that’s not what I was going for.

Not mappings. The Map Transformation on the Item label. https://www.openhab.org/docs/configuration/items.html#label

Got that now, you just asked for what didn’t work :wink:

For me I was able to get around via the selection command

Selection item=LR_TV_Channel mappings=[0="off", 1="DasErste", 2="BBC One", 3="Cartoon Network"]