Hello all!
I want to add a new button so i can collapse all the groups.
So far i have this flow.
[
{
"id": "d16906d2cc3c7ede",
"type": "inject",
"z": "c1337e84224bd2b5",
"name": "",
"props": [],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"x": 150,
"y": 220,
"wires": [
[
"b269e00d16d197b8"
]
]
},
{
"id": "b269e00d16d197b8",
"type": "function",
"z": "c1337e84224bd2b5",
"name": "Close all groups",
"func": "msg.payload = {\"group\":{\"close\":[\n \"MyGroups_GroupA\",\n \"MyGroups_GroupB\",\n \"MyGroups_GroupC\"\n\n]}};\n\n\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 380,
"y": 220,
"wires": [
[
"07044d4ff8890f49"
]
]
},
{
"id": "07044d4ff8890f49",
"type": "ui_ui_control",
"z": "c1337e84224bd2b5",
"name": "",
"events": "all",
"x": 760,
"y": 180,
"wires": [
[]
]
},
{
"id": "5dcf1fbab82ec1fb",
"type": "inject",
"z": "c1337e84224bd2b5",
"name": "",
"props": [],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"x": 150,
"y": 260,
"wires": [
[
"46c06bc1fbe4c03c"
]
]
},
{
"id": "46c06bc1fbe4c03c",
"type": "function",
"z": "c1337e84224bd2b5",
"name": "open all groups",
"func": "msg.payload = {\"group\":{\"open\":[\n \"MyGroups_GroupA\",\n \"MyGroups_GroupB\",\n \"MyGroups_GroupC\"\n\n]}};\n\n\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 380,
"y": 260,
"wires": [
[
"07044d4ff8890f49"
]
]
},
{
"id": "3c86a2a18c2aec09",
"type": "inject",
"z": "c1337e84224bd2b5",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": true,
"onceDelay": 0.1,
"topic": "",
"payload": "42",
"payloadType": "num",
"x": 370,
"y": 320,
"wires": [
[
"a5f14c91df0bdd4f",
"26acbf9803f0bf82",
"6b277beaad37b8c5"
]
]
},
{
"id": "a5f14c91df0bdd4f",
"type": "ui_numeric",
"z": "c1337e84224bd2b5",
"name": "zone 2",
"label": "",
"tooltip": "",
"group": "93c0ae27724e30ac",
"order": 2,
"width": 5,
"height": 1,
"wrap": false,
"passthru": false,
"topic": "",
"topicType": "str",
"format": "{{msg.payload}} %",
"min": "0",
"max": "100",
"step": "1",
"className": "",
"x": 770,
"y": 320,
"wires": [
[]
]
},
{
"id": "26acbf9803f0bf82",
"type": "ui_numeric",
"z": "c1337e84224bd2b5",
"name": "zone 3",
"label": "",
"tooltip": "",
"group": "6d362c521372c2da",
"order": 3,
"width": 5,
"height": 1,
"wrap": false,
"passthru": false,
"topic": "",
"topicType": "str",
"format": "{{msg.payload}} %",
"min": "0",
"max": "100",
"step": "1",
"className": "",
"x": 770,
"y": 360,
"wires": [
[]
]
},
{
"id": "6b277beaad37b8c5",
"type": "ui_numeric",
"z": "c1337e84224bd2b5",
"name": "zone 1",
"label": "",
"tooltip": "",
"group": "b87e85fbe518f1ce",
"order": 1,
"width": 5,
"height": 1,
"wrap": false,
"passthru": false,
"topic": "",
"topicType": "str",
"format": "{{msg.payload}} %",
"min": "0",
"max": "100",
"step": "1",
"className": "",
"x": 770,
"y": 280,
"wires": [
[]
]
},
{
"id": "dc44a9ded8f9acfe",
"type": "ui_template",
"z": "c1337e84224bd2b5",
"group": "b87e85fbe518f1ce",
"name": "",
"order": 2,
"width": 0,
"height": 0,
"format": "<div class=\"md-toolbar-collapse_expand_btn\">\n</div>\n<button class=\"md-icon-button md-button md-collapsebtn\" type=\"button\">\n</button>\n\n\n<style>\n .md-toolbar-collapse_expand_btn {\n border-radius: 50%;\n height: 40px;\n line-height: 24px;\n margin: 0 6px;\n min-width: 0;\n padding: 8px;\n width: 40px\n }\n</style>",
"storeOutMessages": true,
"fwdInMessages": true,
"resendOnRefresh": true,
"templateScope": "global",
"className": "",
"x": 420,
"y": 120,
"wires": [
[]
]
},
{
"id": "93c0ae27724e30ac",
"type": "ui_group",
"name": "GroupB",
"tab": "30414ecef55d0256",
"order": 8,
"disp": true,
"width": "5",
"collapse": true,
"className": "TempCtrlGroupSettings"
},
{
"id": "6d362c521372c2da",
"type": "ui_group",
"name": "GroupC",
"tab": "30414ecef55d0256",
"order": 9,
"disp": true,
"width": "5",
"collapse": true,
"className": "TempCtrlGroupSettings"
},
{
"id": "b87e85fbe518f1ce",
"type": "ui_group",
"name": "GroupA",
"tab": "30414ecef55d0256",
"order": 7,
"disp": true,
"width": "5",
"collapse": true,
"className": "TempCtrlGroupSettings"
},
{
"id": "30414ecef55d0256",
"type": "ui_tab",
"name": "MyGroups",
"icon": "dashboard",
"order": 1,
"disabled": false,
"hidden": false
}
]
I'm stuck with some HTML and CSS basics.
Thanks a lot!
Regards