@fred-freund Ja aber ich habe in dem Objekt, das Du gepostet hast kein val gefunden.
Ausserdem wenn das Deine list Node ist, da kommt ja gar nichts raus:
eb646226-f4d7-450a-955f-209bc0f69011-image.png
Du musst schon das gesamte Objekt ausgeben.
6b8a107f-8687-421e-bc59-484cf71e3806-image.png
Und bei mir funktioniert das auch einwandfrei:
Ich habe mal so einen example state nachgebildet:
3c949caa-914a-497e-aed2-6ce836477a3b-image.png
Also
{
"common": {
"name": "example_state",
"desc": "Manuell erzeugt",
"role": "state",
"type": "multistate",
"read": true,
"write": false,
"states": {
"1": "leak",
"2": "water leak detected"
},
"def": 0
},
"type": "state",
"_id": "0_userdata.0.example_state",
"acl": {
"object": 1636,
"state": 1636,
"owner": "system.user.admin",
"ownerGroup": "system.group.administrator"
},
"from": "system.adapter.admin.0",
"user": "system.user.admin",
"ts": 1668518985872
}
Über den Admin kannst Du theoretisch den Wert so setzen:
2a48d53e-9ed3-462d-9173-b988b05a7923-image.png
c9c7ffde-d67e-4e43-a9da-2fcc0a2f6bf6-image.png
c2003b49-9460-4835-8d9c-4ad7a7838fed-image.png
Spoiler
[
{
"id": "690113de17cd64b1",
"type": "ioBroker list",
"z": "289f539dcc33814e",
"name": "example_state",
"topic": "0_userdata.0.example_state",
"objType": "state",
"regex": "",
"asArray": "false",
"onlyIDs": "false",
"withValues": "true",
"x": 2040,
"y": 4580,
"wires": [
[
"5fd0d86854a06e05",
"3b6c06471c41e00b"
]
]
},
{
"id": "3b6c06471c41e00b",
"type": "debug",
"z": "289f539dcc33814e",
"name": "debug 47",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 2280,
"y": 4540,
"wires": []
},
{
"id": "3e6489ae5381b35c",
"type": "inject",
"z": "289f539dcc33814e",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 1840,
"y": 4580,
"wires": [
[
"690113de17cd64b1"
]
]
},
{
"id": "5fd0d86854a06e05",
"type": "change",
"z": "289f539dcc33814e",
"name": "",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "payload.common.states[msg.payload.val]",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 2290,
"y": 4580,
"wires": [
[
"e89b20888058e8fc"
]
]
},
{
"id": "e89b20888058e8fc",
"type": "debug",
"z": "289f539dcc33814e",
"name": "debug 48",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "false",
"statusVal": "",
"statusType": "auto",
"x": 2480,
"y": 4580,
"wires": []
}
]