Hello this is my first question here,
I’m using a light sensor and I’ve added it into .items as a contact
items:
Contact KY018 “Light Sensor [%s]” {gpio=“pin:23 activelow:yes”}
sitemap
Text item=KY018
in UI it sayes
Light Sensor CLOSED
or
Light Sensor OPEN
2.) Use the documentation. Your Question should be answered if you read the topics about the Sitemap and the usable options. To give you some hint: You have to specify a label with a MAP Transformation. Sounds complicated, but ist isn’t. A MAP Transformation exchanges text so your CLOSED could be easyly changed to GESCHLOSSEN or something else.
I would suggest that you start digging a little more deaper into item and sitemap definitions.
I’m pretty sure a light sensor should be represented as a switch item rather than a contact item.
Please be aware that by using the Text widget in the sitemap, there won’t be a switch but only the text (ON or OFF). If you want to customize the status text, simply use the MAP service:
items/my.items: