[ { "id": "3cee3b83.b28a44", "type": "server-events", "z": "eaf98867.654bf8", "name": "Deconz events", "server": "3bebce79.1e0962", "event_type": "deconz_event", "exposeToHomeAssistant": false, "haConfig": [ { "property": "name", "value": "" }, { "property": "icon", "value": "" } ], "x": 140, "y": 140, "wires": [ [ "845d290c.d3057" ] ] }, { "id": "845d290c.d3057", "type": "switch", "z": "eaf98867.654bf8", "name": "IKEA Trådfri", "property": "payload.event.id", "propertyType": "msg", "rules": [ { "t": "eq", "v": "tradfri_remote_control", "vt": "str" } ], "checkall": "true", "repair": false, "outputs": 1, "x": 310, "y": 140, "wires": [ [ "87a11c9e.2995b" ] ] }, { "id": "87a11c9e.2995b", "type": "switch", "z": "eaf98867.654bf8", "name": "Button press", "property": "payload.event.event", "propertyType": "msg", "rules": [ { "t": "eq", "v": "1002", "vt": "num" } ], "checkall": "true", "repair": false, "outputs": 1, "x": 470, "y": 140, "wires": [ [ "b183b99a.b1daf8", "216412fd.1945be" ] ], "outputLabels": [ "On/off" ] }, { "id": "b183b99a.b1daf8", "type": "counter", "z": "eaf98867.654bf8", "name": "Press count", "init": "0", "step": "1", "lower": "", "upper": "", "mode": "increment", "outputs": 1, "x": 690, "y": 140, "wires": [ [ "c8e84bef.8cb9d" ] ] }, { "id": "c8e84bef.8cb9d", "type": "switch", "z": "eaf98867.654bf8", "name": "", "property": "count", "propertyType": "msg", "rules": [ { "t": "eq", "v": "2", "vt": "num" }, { "t": "else" } ], "checkall": "true", "repair": false, "outputs": 2, "x": 850, "y": 140, "wires": [ [ "629c3378.c997cc" ], [ "c2efc0eb.28a33" ] ] }, { "id": "216412fd.1945be", "type": "delay", "z": "eaf98867.654bf8", "name": "", "pauseType": "delay", "timeout": "1", "timeoutUnits": "seconds", "rate": "1", "nbRateUnits": "1", "rateUnits": "second", "randomFirst": "1", "randomLast": "5", "randomUnits": "seconds", "drop": false, "x": 680, "y": 80, "wires": [ [ "b9d0baf3.ba6f28" ] ] }, { "id": "b9d0baf3.ba6f28", "type": "function", "z": "eaf98867.654bf8", "name": "Reset counter", "func": "msg.reset = true;\nreturn msg;", "outputs": 1, "noerr": 0, "initialize": "", "finalize": "", "x": 880, "y": 80, "wires": [ [ "b183b99a.b1daf8" ] ] }, { "id": "629c3378.c997cc", "type": "debug", "z": "eaf98867.654bf8", "name": "Dbl.tap", "active": true, "tosidebar": true, "console": false, "tostatus": false, "complete": "true", "targetType": "full", "statusVal": "", "statusType": "auto", "x": 1100, "y": 100, "wires": [] }, { "id": "c2efc0eb.28a33", "type": "debug", "z": "eaf98867.654bf8", "name": "Single.tap", "active": true, "tosidebar": true, "console": false, "tostatus": false, "complete": "true", "targetType": "full", "statusVal": "", "statusType": "auto", "x": 1100, "y": 160, "wires": [] }, { "id": "3bebce79.1e0962", "type": "server", "z": "", "name": "Home Assistant", "addon": true } ]