I have been trying to migrate to dashboard2 and am struggling. I want to reveal some text if the incoming payload is "on" This code looks as if it should work but doesn't. Please help.
[
{
"id": "a464aa4f6cd7c2ff",
"type": "inject",
"z": "9343587668680ce0",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "on",
"payloadType": "str",
"x": 510,
"y": 1300,
"wires": [
[
"b0ca6a8c172c68a6"
]
]
},
{
"id": "75cbd6369c7c7cce",
"type": "inject",
"z": "9343587668680ce0",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "off",
"payloadType": "str",
"x": 516,
"y": 1341,
"wires": [
[
"b0ca6a8c172c68a6"
]
]
},
{
"id": "b0ca6a8c172c68a6",
"type": "ui-template",
"z": "9343587668680ce0",
"group": "1efabcc365cc00ef",
"name": "another try",
"order": 3,
"width": 0,
"height": 0,
"head": "",
"format": "<template>\n <div v-if=\"payload === 'on'\">\n Hello World\n </div>\n</template>\n\n<script>\nexport default {\n data() {\n return {\n payload: 'on', // default state, can be 'on' or 'off'\n };\n },\n methods: {\n updatePayload(newPayload) {\n this.payload = newPayload;\n },\n },\n};\n</script>\n",
"storeOutMessages": true,
"passthru": true,
"resendOnRefresh": true,
"templateScope": "local",
"className": "",
"x": 770,
"y": 1320,
"wires": [
[]
]
},
{
"id": "1efabcc365cc00ef",
"type": "ui-group",
"name": "group3",
"page": "16b743c98720397b",
"width": "6",
"height": "1",
"order": 1,
"showTitle": true,
"className": "",
"visible": "true",
"disabled": "false"
},
{
"id": "16b743c98720397b",
"type": "ui-page",
"name": "Page 3",
"ui": "496d601133bce288",
"path": "/page3",
"icon": "home",
"layout": "grid",
"theme": "0fa083067f4afa84",
"order": 3,
"className": "",
"visible": "true",
"disabled": "false"
},
{
"id": "496d601133bce288",
"type": "ui-base",
"name": "UI Name",
"path": "/dashboard",
"includeClientData": true,
"acceptsClientConfig": [
"ui-notification",
"ui-control"
],
"showPathInSidebar": false,
"showPageTitle": true,
"navigationStyle": "default",
"titleBarStyle": "default"
},
{
"id": "0fa083067f4afa84",
"type": "ui-theme",
"name": "Default",
"colors": {
"surface": "#ffffff",
"primary": "#0094ce",
"bgPage": "#eeeeee",
"groupBg": "#ffffff",
"groupOutline": "#cccccc"
},
"sizes": {
"pagePadding": "12px",
"groupGap": "12px",
"groupBorderRadius": "4px",
"widgetGap": "12px"
}
}
]