I have an item configuration:
Contact DoorSensor01 “Sensor 01 [MAP(de.map):%s]”
I think the internal item structure files are:
item.name: DoorSensor01
item.typ. Contact
item.label: "Sensor 01"
What internal variabel holds the item label definition “Sensor 01 [MAP(de.map):%s]”?
Is it possible to change this label definition at runtime to:
Contact DoorSensor01 “Monitoring 01 [MAP(de.map):%s]”
I tried:
DoorSensor01.label = “Monitoring 01 [MAP(de.map):%s]”
But this does not work. It changes the interpreted label but not the label definition. Is there a way to access label definition on runtime?
Wait what? Are you trying to change the Label with a rule or why you try to use DoorSensor01.label ?
This would be like this (I think)
DoorSensor01.setLabel("Monitoring 01 [MAP(de.map):%s]")
docs: http://www.eclipse.org/smarthome/documentation/javadoc/org/eclipse/smarthome/core/items/GenericItem.html
It looks like .label and .setlabel does the same:
I want to have more information in one line.
normaly:
DoorSensor01.label = “Monitoring 01 [MAP(de.map):%s]”
leads to this in ClassicUI
Monitoring 01 - left aligned
Closed - right aligned
What I want to reach:
Monitoring 01 - left aligned
some text Closed - right aligned
DoorSensor01.setLabel(“Monitoring 01 [Some Text: %s]”)
This is working but if I use mapping part too, it is not working.
DoorSensor01.setLabel(“Monitoring 01 [Some Text: MAP(de.map):%s]”)
I think this is not a problem with the item label manipulation. It looks like the definition of the syntax says:
"No additional text before item definition inside the backets, only behind.
Which means, this will work:
Number DoorSensor13_realrainrate “realrainrate [%.1f mm/h]”
but this not:
Number DoorSensor13_realrainrate “realrainrate [mm/h %.1f]”
Because “mm/h” is the beginning of the part in brackets?