Hi, excuse because of late response (I was not able to use PC) ...
Thanks igrowing and dceejay.
It is solved by inserting empty spaces into the template. I hope the bug will be solved.
Also for zenofmud, I attach the flow, may be useful to somebody.
Regards!
[
{
"id": "2fa3db04.096184",
"type": "tab",
"label": "example",
"disabled": false,
"info": ""
},
{
"id": "ef4b84d9.36bd68",
"type": "ui_template",
"z": "2fa3db04.096184",
"group": "1dd8801.d68108",
"name": "ui_example",
"order": 1,
"width": "10",
"height": "2",
"format": "<div layout=\"row\" layout-align=\"space-between\">\n<p>{{msg.input_name}}</p>\n<p style=\"color:{{msg.txt_color}}; background-color:{{msg.bkg_txt_color}}\">{{msg.state}}</p>\n</div>",
"storeOutMessages": true,
"fwdInMessages": true,
"templateScope": "local",
"x": 670,
"y": 180,
"wires": [
[]
]
},
{
"id": "725e9a53.2c2324",
"type": "inject",
"z": "2fa3db04.096184",
"name": "state_1",
"topic": "",
"payload": "{\"msg.input_name\":\"Input 1\",\"msg.state\":\"OK\",\"msg.txt_color\":\"green\",\"msg.bkg_txt_color\":\"yellow\"}",
"payloadType": "json",
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"x": 130,
"y": 160,
"wires": [
[
"2aafa004.1460c"
]
]
},
{
"id": "2aafa004.1460c",
"type": "change",
"z": "2fa3db04.096184",
"name": "change msg properties by (move)",
"rules": [
{
"t": "move",
"p": "payload[\"msg.input_name\"]",
"pt": "msg",
"to": "input_name",
"tot": "msg"
},
{
"t": "move",
"p": "payload[\"msg.state\"]",
"pt": "msg",
"to": "state",
"tot": "msg"
},
{
"t": "move",
"p": "payload[\"msg.txt_color\"]",
"pt": "msg",
"to": "txt_color",
"tot": "msg"
},
{
"t": "move",
"p": "payload[\"msg.bkg_txt_color\"]",
"pt": "msg",
"to": "bkg_txt_color",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 420,
"y": 180,
"wires": [
[
"ef4b84d9.36bd68"
]
]
},
{
"id": "8b0ec944.4503c8",
"type": "inject",
"z": "2fa3db04.096184",
"name": "state_2",
"topic": "",
"payload": "{\"msg.input_name\":\"Input 1\",\"msg.state\":\"ALARM\",\"msg.txt_color\":\"red\",\"msg.bkg_txt_color\":\"lightgray\"}",
"payloadType": "json",
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"x": 130,
"y": 200,
"wires": [
[
"2aafa004.1460c"
]
]
},
{
"id": "5fdb86c.48c8f78",
"type": "ui_button",
"z": "2fa3db04.096184",
"name": "",
"group": "1dd8801.d68108",
"order": 3,
"width": 0,
"height": 0,
"passthru": false,
"label": "OK status",
"color": "",
"bgcolor": "",
"icon": "",
"payload": "{\"msg.input_name\":\"Input 1\",\"msg.state\":\"OK\",\"msg.txt_color\":\"green\",\"msg.bkg_txt_color\":\"yellow\"}",
"payloadType": "json",
"topic": "",
"x": 120,
"y": 60,
"wires": [
[
"2aafa004.1460c"
]
]
},
{
"id": "9a636476.ef81d8",
"type": "ui_button",
"z": "2fa3db04.096184",
"name": "",
"group": "1dd8801.d68108",
"order": 4,
"width": 0,
"height": 0,
"passthru": false,
"label": "ALARM status",
"color": "",
"bgcolor": "",
"icon": "",
"payload": "{\"msg.input_name\":\"Input 1\",\"msg.state\":\"ALARM\",\"msg.txt_color\":\"red\",\"msg.bkg_txt_color\":\"lightgray\"}",
"payloadType": "json",
"topic": "",
"x": 100,
"y": 100,
"wires": [
[
"2aafa004.1460c"
]
]
},
{
"id": "fa820bed.6227a8",
"type": "ui_text",
"z": "2fa3db04.096184",
"group": "1dd8801.d68108",
"order": 2,
"width": 0,
"height": 0,
"name": "",
"label": "Click to change status in ui_template",
"format": "{{msg.payload}}",
"layout": "row-spread",
"x": 170,
"y": 280,
"wires": []
},
{
"id": "1dd8801.d68108",
"type": "ui_group",
"z": "",
"name": "I/O state example",
"tab": "777f6f4e.d0e41",
"disp": true,
"width": "10",
"collapse": false
},
{
"id": "777f6f4e.d0e41",
"type": "ui_tab",
"z": "",
"name": "test",
"icon": "dashboard"
}
]