UnborN:
[{"id":"fead03c6.fd3e18","type":"switch","z":"3b79f9f0.c819be","name":"","property":"payload.state","propertyType":"msg","rules":[{"t":"gt","v":"0","vt":"num"}],"checkall":"true","repair":false,"outputs":1,"x":910,"y":440,"wires":[["25cc2cf6.4a4a14"]]},{"id":"f66f1eb.90331e","type":"inject","z":"3b79f9f0.c819be","name":"data","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"{\"PRNRS_Shutter\":{\"link\":\"http://172.17.0.1:9000/rest/items/PRNRS_Shutter\",\"state\":\"0\",\"stateDescription\":{\"pattern\":\"%d %%\",\"readOnly\":false,\"options\":[]},\"editable\":false,\"type\":\"Rollershutter\",\"name\":\"PRNRS_Shutter\",\"label\":\"Parent Room North\",\"category\":\"rollershutter\",\"tags\":[\"Blinds\"],\"groupNames\":[\"gShutters\",\"gShuttersPR\"]},\"PRWRS_Shutter\":{\"link\":\"http://172.17.0.1:9000/rest/items/PRWRS_Shutter\",\"state\":\"0\",\"stateDescription\":{\"pattern\":\"%d %%\",\"readOnly\":false,\"options\":[]},\"editable\":false,\"type\":\"Rollershutter\",\"name\":\"PRWRS_Shutter\",\"label\":\"Parent Room West\",\"category\":\"rollershutter\",\"tags\":[\"Blinds\"],\"groupNames\":[\"gShutters\",\"gShuttersPR\"]}}","payloadType":"json","x":300,"y":440,"wires":[["9217d91b.46b75"]]},{"id":"9217d91b.46b75","type":"change","z":"3b79f9f0.c819be","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.*.{\t \"state\": $number(state),\t \"label\" : label\t }","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":530,"y":440,"wires":[["d06024c8.70ef48","f5a511ef.98a2c"]]},{"id":"d06024c8.70ef48","type":"split","z":"3b79f9f0.c819be","name":"","splt":"\\n","spltType":"str","arraySplt":1,"arraySpltType":"len","stream":false,"addname":"","x":730,"y":440,"wires":[["fead03c6.fd3e18","9039addc.57f648"]]},{"id":"f5a511ef.98a2c","type":"debug","z":"3b79f9f0.c819be","name":"1","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":590,"y":360,"wires":[]},{"id":"9039addc.57f648","type":"debug","z":"3b79f9f0.c819be","name":"2","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":810,"y":360,"wires":[]},{"id":"25cc2cf6.4a4a14","type":"debug","z":"3b79f9f0.c819be","name":"> 0","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1050,"y":440,"wires":[]}]
Thanks, And Merry Xmas to you as well.
I actually managed to do that, a bit different from your approach. And to be honest, I'll be using yours probably
[{"id":"fead03c6.fd3e18","type":"switch","z":"b3aeb474.f69408","name":"","property":"payload.state","propertyType":"msg","rules":[{"t":"gt","v":"0","vt":"num"}],"checkall":"true","repair":false,"outputs":1,"x":850,"y":620,"wires":[["25cc2cf6.4a4a14"]]},{"id":"f66f1eb.90331e","type":"inject","z":"b3aeb474.f69408","name":"data","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"{\"PRNRS_Shutter\":{\"link\":\"http://172.17.0.1:9000/rest/items/PRNRS_Shutter\",\"state\":\"10\",\"stateDescription\":{\"pattern\":\"%d %%\",\"readOnly\":false,\"options\":[]},\"editable\":false,\"type\":\"Rollershutter\",\"name\":\"PRNRS_Shutter\",\"label\":\"Parent Room North\",\"category\":\"rollershutter\",\"tags\":[\"Blinds\"],\"groupNames\":[\"gShutters\",\"gShuttersPR\"]},\"PRWRS_Shutter\":{\"link\":\"http://172.17.0.1:9000/rest/items/PRWRS_Shutter\",\"state\":\"10\",\"stateDescription\":{\"pattern\":\"%d %%\",\"readOnly\":false,\"options\":[]},\"editable\":false,\"type\":\"Rollershutter\",\"name\":\"PRWRS_Shutter\",\"label\":\"Parent Room West\",\"category\":\"rollershutter\",\"tags\":[\"Blinds\"],\"groupNames\":[\"gShutters\",\"gShuttersPR\"]}}","payloadType":"json","x":240,"y":620,"wires":[["9217d91b.46b75","91d0c4e3.9bcff8"]]},{"id":"9217d91b.46b75","type":"change","z":"b3aeb474.f69408","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.*.{\t \"state\": $number(state),\t \"label\" : label\t }","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":470,"y":620,"wires":[["d06024c8.70ef48","f5a511ef.98a2c"]]},{"id":"d06024c8.70ef48","type":"split","z":"b3aeb474.f69408","name":"","splt":"\\n","spltType":"str","arraySplt":1,"arraySpltType":"len","stream":false,"addname":"","x":670,"y":620,"wires":[["fead03c6.fd3e18","9039addc.57f648"]]},{"id":"f5a511ef.98a2c","type":"debug","z":"b3aeb474.f69408","name":"1","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":530,"y":540,"wires":[]},{"id":"9039addc.57f648","type":"debug","z":"b3aeb474.f69408","name":"2","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":750,"y":540,"wires":[]},{"id":"25cc2cf6.4a4a14","type":"debug","z":"b3aeb474.f69408","name":"> 0","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":990,"y":620,"wires":[]},{"id":"a0625e87.21058","type":"function","z":"b3aeb474.f69408","name":"MSG","func":"var v = msg.payload.shutterDetails\nvar text = '';\nfor (var i = 0; i < v.length; i++) {\n if (v[i].state >= 7) {\n text += v[i].label + ' is opened ' + v[i].state + '%\\n';\n }\n}\nmsg.payload.array = text\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":670,"y":740,"wires":[["ec0fe5b1.529e98"]]},{"id":"91d0c4e3.9bcff8","type":"change","z":"b3aeb474.f69408","name":"","rules":[{"t":"move","p":"payload","pt":"msg","to":"ToBeDeleted","tot":"msg"},{"t":"set","p":"payload.shutterDetails","pt":"msg","to":"ToBeDeleted.*","tot":"jsonata"},{"t":"delete","p":"ToBeDeleted","pt":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":460,"y":740,"wires":[["a0625e87.21058","91d1951e.600d48"]]},{"id":"91d1951e.600d48","type":"debug","z":"b3aeb474.f69408","name":"3","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":510,"y":680,"wires":[]},{"id":"ec0fe5b1.529e98","type":"debug","z":"b3aeb474.f69408","name":"4","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":750,"y":680,"wires":[]}]