Sorry for late reply, but it took some time to do some testing with different approaches.
result is that it is not working at all! Neither with MAP in item pattern nor with MAP in widgets.
I am running OH3 M3.1 on a Raspi installed with Openhabian.
MAP-Transformation was already installed and i use it e.g. for the MAC-online status (ON=daheim, OFF=weg) and it is working quite well. In this case the MAP is done in the stateDescription / pattern of the item.
i tried the same for FB9xyz_AusgehenderAnrufName
{
"link": "http://ohshd:8080/rest/items/FB9xyz_AusgehenderAnrufName",
"state": "anrufer name",
"transformedState": "",
"stateDescription": {
"pattern": "MAP(fritzcall.map):%s",
"readOnly": true,
"options": []
},
"editable": true,
"type": "String",
"name": "FB9xyz_AusgehenderAnrufName",
"label": "FB Angerufener Name",
"category": "",
"tags": [
"Point"
],
"groupNames": [
"FB9xyz"
]
}
and the result is (list items):
for FB9xyz_EingehenderAnruf i tried a different approach: no MAP at the item-level
{
"link": "http://ohshd:8080/rest/items/FB9xyz_EingehenderAnruf",
"state": "UNDEF",
"stateDescription": {
"pattern": "%2$s",
"readOnly": true,
"options": []
},
"editable": true,
"type": "Call",
"name": "FB9xyz_EingehenderAnruf",
"label": "FB Eingehender Anruf Nr.",
"category": "",
"tags": [
"Point"
],
"groupNames": [
"FB9xyz",
"gPersInfluxDB"
]
}
but in the widget:
i tried several different ways for MAP / =MAP etc. , none of them was working.
component: oh-label-cell
config:
item: FB9xyz_EingehenderAnruf
icon: f7:phone
title: wer ruft an
label: testlabel [MAP(fritzcall.map):%s]
label-cell
So far, i have not found a way to get rid of the UNDEF state.
Persistence for UNDEF state
Maybe it is linked to another issue i am facing: for the UNDEF-item state i don’t get this state in the persistence service (MAPDB). After a restart i only get the latest value <> UNDEF.
i have no further idea how to solve this UNDEF - problem