Code:
[
{
"id": "1e854fc5.7357a",
"type": "switch",
"z": "e1740332.c53fa",
"name": "switch",
"property": "payload",
"propertyType": "msg",
"rules": [
{
"t": "cont",
"v": "\"onoff: 0\"",
"vt": "str"
},
{
"t": "cont",
"v": "\"onoff: 1\"",
"vt": "str"
}
],
"checkall": "true",
"repair": false,
"outputs": 2,
"x": 350,
"y": 240,
"wires": [
[
"a5584745.6c20b8",
"7794e59d.e8f68c"
],
[
"80508537.307178"
]
]
},
{
"id": "a5584745.6c20b8",
"type": "api-call-service",
"z": "e1740332.c53fa",
"name": "Allumer hue 1",
"server": "5b460a6c.c0a2c4",
"version": 1,
"debugenabled": false,
"service_domain": "light",
"service": "toggle",
"entityId": "light.hue1",
"data": "",
"dataType": "json",
"mergecontext": "",
"output_location": "",
"output_location_type": "none",
"mustacheAltTags": false,
"x": 570,
"y": 200,
"wires": [
[
"7ca31e9b.0cfba"
]
]
},
{
"id": "80508537.307178",
"type": "api-call-service",
"z": "e1740332.c53fa",
"name": "Allumer hue 2",
"server": "5b460a6c.c0a2c4",
"version": 1,
"debugenabled": false,
"service_domain": "light",
"service": "toggle",
"entityId": "light.hue_color_lamp_2",
"data": "",
"dataType": "json",
"mergecontext": "",
"output_location": "",
"output_location_type": "none",
"mustacheAltTags": false,
"x": 570,
"y": 280,
"wires": [
[
"b82161e9.a3f0c"
]
]
},
{
"id": "7ca31e9b.0cfba",
"type": "debug",
"z": "e1740332.c53fa",
"name": "",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 790,
"y": 200,
"wires": []
},
{
"id": "b82161e9.a3f0c",
"type": "debug",
"z": "e1740332.c53fa",
"name": "",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "false",
"statusVal": "",
"statusType": "auto",
"x": 790,
"y": 280,
"wires": []
},
{
"id": "e2e003a.30fd5",
"type": "server-events",
"z": "e1740332.c53fa",
"name": "",
"server": "5b460a6c.c0a2c4",
"event_type": "button_pressed",
"exposeToHomeAssistant": false,
"haConfig": [
{
"property": "name",
"value": ""
},
{
"property": "icon",
"value": ""
}
],
"waitForRunning": true,
"x": 140,
"y": 240,
"wires": [
[
"1e854fc5.7357a"
]
]
},
{
"id": "7794e59d.e8f68c",
"type": "debug",
"z": "e1740332.c53fa",
"name": "",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 390,
"y": 120,
"wires": []
},
{
"id": "5b460a6c.c0a2c4",
"type": "server",
"name": "Home Assistant",
"addon": true
}
]