MS1982
(Marcel Salein)
July 16, 2017, 9:12pm
1
Hi,
I have a KNX alarm box that returns three rows of text regarding a security area e.g.
Row1: Ground Floor
Row2: Ready for
Row3: arming
My items file looks like this:
String Text1_SA1 (gMyOpenHAB) { knx="<5/2/1" }
String Text2_SA1 (gMyOpenHAB) { knx="<5/2/2" }
String Text3_SA1 (gMyOpenHAB) { knx="<5/2/3" }
In the sitemap I have added this
Text label="Security" icon="none" {
Text item=Text1_SA1 label="[%s]" icon="none"
Text item=Text2_SA1 label="[%s]" icon="none"
Text item=Text3_SA1 label="[%s]" icon="none"
}
The result is that the text is aligned on the right, which looks not nice at all.
I wonder if it is possible to show the value of the item aligned on the left resp. it is possible to use the value as label text.
Thanks in advance for any advice to solve this.
BR
Marcel
rossko57
(Rossko57)
July 16, 2017, 9:22pm
2
There is a poorly understood/documented .label property of an Item that can be set in a rule (usually)
Hi! I’ve got a “var Number tParty = 19.5” in my heating.rules. I would like to have a switch on my sitemap that is labeled “Party [value_of_tParty] °C”. Is that possible?
Hi,
I want to have a timestamp in my label. I got it working for one individual item:
rule "Update label"
when
Item Tex_Window_W10_GV_Bureau_Zijkant received update
then
val label = Tex_Window_W10_GV_Bureau_Zijkant.label.toString.split(" ")
Tex_Window_W10_GV_Bureau_Zijkant.label = label.get(0) + " " + " " + " (" + Tex_Window_W10_GV_Bureau_Zijkant.lastUpdate.toDateTime.toString("dd-MM-yy hh:mm") + ")"
end
It results in a label like “Livingroom window (30-05-17 11:43)”.
I wanted to appl…