DSC binding 2.1 - Parition arm mode item cannot hide state in UI without using MAP!

HI @rsstephens and all,

Running in OH2 with Dscalarm 2.1. Once again, great work @rsstephens and thank you for maintaining the binding!

I have an item mapped to the partition arm mode channel:

Number Dsc_Partition_Arm_Mode "Partition Arm Mode: [%s]" {channel="dscalarm:partition:XXYYZZ:partition1:partition_arm_mode"}

When I do this in the sitemap:

Switch item=Dsc_Partition_Arm_Mode label="Alarm Arm Options:" icon="lock" mappings=[0="Disarm", 1="Away", 2="Stay"]

There is always the state displayed beside the buttons:

I remember in OH1, I did the same thing and there is no state showing. I tried in OH2 with another number item, and no state showing either.

I had to make a map and hide it like this:

Switch item=Dsc_Partition_Arm_Mode label="Alarm Arm Options:[MAP(number.map):%s]" icon="lock" mappings=[0="Disarm", 1="Away", 2="Stay"]

Just wondering if this is by design or a bug?


It is showing the state because you are telling it to in the label. The [%s] and [MAP(number.map):%s] are two ways one puts the Item’s state into the label.

Remove them and the state will go away.

If you look at my first sitemap, I don’t have %s nor map, yet it stills shows up.


what happens when you remove the [%s] from the item?

I vaguely remember a similar problem reported a while back but thought it was fixed. What version are you running?

Just tried. Removing %s from item fixes it. So the issue is sitemap label not overriding item’s?

I am running 2.1.0 - release build -


Sounds like it and I bet if you upgraded to the 2.2 SNAPSHOT the error will go away. I’m 90% positive this has been fixed in the SNAPSHOT.