Thanks for your feedback!
So I analyzed the REST Api a little bit, and got the following understanding:
When I make a REST-Api call as follows
http://homenuc:8080/rest/items/Wohnzimmer_Fenster1_OpenClosed/state
it always returns the unmapped value:
CLOSED
respectively
OPEN
When you are not calling the state directly but the item itself
http://homenuc:8080/rest/items/Wohnzimmer_Fenster1_OpenClosed
you always get the mapped value beside “state”:
{
"link": "http://homenuc:8080/rest/items/Wohnzimmer_Fenster1_OpenClosed",
"state": "zu",
"stateDescription": {
"pattern": "",
"readOnly": false,
"options": []
},
"type": "Contact",
"name": "Wohnzimmer_Fenster1_OpenClosed",
"label": "Wohnzimmerfenster 1",
"tags": [],
"groupNames": [
"Wohnzimmer",
"Wohnung_Fenster"
]
}
respectively
{
"link": "http://homenuc:8080/rest/items/Wohnzimmer_Fenster1_OpenClosed",
"state": "offen",
"stateDescription": {
"pattern": "",
"readOnly": false,
"options": []
},
"type": "Contact",
"name": "Wohnzimmer_Fenster1_OpenClosed",
"label": "Wohnzimmerfenster 1",
"tags": [],
"groupNames": [
"Wohnzimmer",
"Wohnung_Fenster"
]
}
I couldn’t find any documentation which describes if this is “works as designed” or a bug.
Of course on the event channel you always get the original, unmapped value. As far as I know, the Android application also works with the REST-Api and there the values are always shown in their mapped version. So I would assume, that the make an additional call to the item and get the mapped value besides the “state” key which is then visualized.
Maybe someone of the REST-Api experts can support here?
Thanks in advance.