[
    {
        "id": "49df5f85259a72e4",
        "type": "tab",
        "label": "MS 2",
        "disabled": false,
        "info": "",
        "env": []
    },
    {
        "id": "462f0a1cfdd0b99e",
        "type": "mqtt in",
        "z": "49df5f85259a72e4",
        "name": "",
        "topic": "zigbee2mqtt/Taster1",
        "qos": "2",
        "datatype": "json",
        "broker": "0ddb07c65cbb68bc",
        "nl": false,
        "rap": true,
        "rh": 0,
        "inputs": 0,
        "x": 95,
        "y": 260,
        "wires": [
            [
                "bec5fd4e69499737",
                "fa0e52d06a45ed07"
            ]
        ]
    },
    {
        "id": "bec5fd4e69499737",
        "type": "change",
        "z": "49df5f85259a72e4",
        "name": "battery",
        "rules": [
            {
                "t": "set",
                "p": "payload",
                "pt": "msg",
                "to": "payload.battery",
                "tot": "msg"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 235,
        "y": 20,
        "wires": [
            [
                "be97fee179bc38d7"
            ]
        ]
    },
    {
        "id": "be97fee179bc38d7",
        "type": "ui_gauge",
        "z": "49df5f85259a72e4",
        "name": "",
        "group": "5b472defad86d1b3",
        "order": 0,
        "width": 0,
        "height": 0,
        "gtype": "gage",
        "title": "Taster 1 Batterie",
        "label": "%",
        "format": "{{value}}",
        "min": 0,
        "max": "100",
        "colors": [
            "#ff0000",
            "#e6e600",
            "#80ff00"
        ],
        "seg1": "",
        "seg2": "",
        "diff": false,
        "className": "",
        "x": 495,
        "y": 20,
        "wires": []
    },
    {
        "id": "f6712e7ef4452f2b",
        "type": "mqtt out",
        "z": "49df5f85259a72e4",
        "name": "",
        "topic": "pkw/cmnd/dimmer/1/POWER",
        "qos": "",
        "retain": "",
        "respTopic": "",
        "contentType": "",
        "userProps": "",
        "correl": "",
        "expiry": "",
        "broker": "0ddb07c65cbb68bc",
        "x": 935,
        "y": 100,
        "wires": []
    },
    {
        "id": "12e98c0f245b96df",
        "type": "zigbee2mqtt-out",
        "z": "49df5f85259a72e4",
        "name": "",
        "server": "c3c038ded1f61252",
        "friendly_name": "FunkRelais1 (TYWB 4ch-RF)",
        "device_id": "0xa4c13821bfb5e08f",
        "command": "state",
        "commandType": "z2m_cmd",
        "payload": "payload",
        "payloadType": "msg",
        "optionsValue": "",
        "optionsType": "nothing",
        "x": 1155,
        "y": 580,
        "wires": []
    },
    {
        "id": "1e5a8eb1129b6c8d",
        "type": "zigbee2mqtt-get",
        "z": "49df5f85259a72e4",
        "name": "",
        "server": "c3c038ded1f61252",
        "friendly_name": "FunkRelais1 (TYWB 4ch-RF)",
        "device_id": "0xa4c13821bfb5e08f",
        "state": "0",
        "enableMultiple": false,
        "x": 375,
        "y": 580,
        "wires": [
            [
                "1320615e2ea7e576"
            ]
        ]
    },
    {
        "id": "1320615e2ea7e576",
        "type": "change",
        "z": "49df5f85259a72e4",
        "name": "Lösche Relais Werte",
        "rules": [
            {
                "t": "delete",
                "p": "payload.backlight_mode",
                "pt": "msg"
            },
            {
                "t": "delete",
                "p": "payload.linkquality",
                "pt": "msg"
            },
            {
                "t": "delete",
                "p": "payload.power_on_behavior_l1",
                "pt": "msg"
            },
            {
                "t": "delete",
                "p": "payload.power_on_behavior_l2",
                "pt": "msg"
            },
            {
                "t": "delete",
                "p": "payload.power_on_behavior_l3",
                "pt": "msg"
            },
            {
                "t": "delete",
                "p": "payload.power_on_behavior_l4",
                "pt": "msg"
            },
            {
                "t": "delete",
                "p": "payload.state",
                "pt": "msg"
            },
            {
                "t": "delete",
                "p": "payload.state_l2",
                "pt": "msg"
            },
            {
                "t": "delete",
                "p": "payload.state_l3",
                "pt": "msg"
            },
            {
                "t": "delete",
                "p": "payload.state_l4",
                "pt": "msg"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 595,
        "y": 580,
        "wires": [
            [
                "1ee5e23c64b54446",
                "089be8ffcb21f397"
            ]
        ]
    },
    {
        "id": "a718a86792885e3e",
        "type": "change",
        "z": "49df5f85259a72e4",
        "name": "Relais 1 ON",
        "rules": [
            {
                "t": "set",
                "p": "payload.state_l1",
                "pt": "msg",
                "to": "ON",
                "tot": "str"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 895,
        "y": 560,
        "wires": [
            [
                "12e98c0f245b96df"
            ]
        ]
    },
    {
        "id": "2408d7d95d4b957a",
        "type": "change",
        "z": "49df5f85259a72e4",
        "name": "Relais 1 OFF",
        "rules": [
            {
                "t": "set",
                "p": "payload.state_l1",
                "pt": "msg",
                "to": "OFF",
                "tot": "str"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 895,
        "y": 600,
        "wires": [
            [
                "12e98c0f245b96df"
            ]
        ]
    },
    {
        "id": "089be8ffcb21f397",
        "type": "switch",
        "z": "49df5f85259a72e4",
        "name": "R1 ON?",
        "property": "payload.state_l1",
        "propertyType": "msg",
        "rules": [
            {
                "t": "eq",
                "v": "ON",
                "vt": "str"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 1,
        "x": 735,
        "y": 600,
        "wires": [
            [
                "2408d7d95d4b957a"
            ]
        ]
    },
    {
        "id": "1ee5e23c64b54446",
        "type": "switch",
        "z": "49df5f85259a72e4",
        "name": "R1 OFF?",
        "property": "payload.state_l1",
        "propertyType": "msg",
        "rules": [
            {
                "t": "eq",
                "v": "OFF",
                "vt": "str"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 1,
        "x": 735,
        "y": 560,
        "wires": [
            [
                "a718a86792885e3e"
            ]
        ]
    },
    {
        "id": "b9e408deba1c5769",
        "type": "one-button-dimmer",
        "z": "49df5f85259a72e4",
        "name": "",
        "interval": "100",
        "step": "1",
        "minValue": 0,
        "maxValue": "100",
        "startCommand": "start",
        "stopCommand": "stop",
        "x": 855,
        "y": 260,
        "wires": [
            [
                "1c9d36ae20e630f4"
            ]
        ]
    },
    {
        "id": "aaefd396a0360711",
        "type": "inject",
        "z": "49df5f85259a72e4",
        "name": "",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "0",
        "payloadType": "num",
        "x": 995,
        "y": 380,
        "wires": [
            [
                "b9e408deba1c5769"
            ]
        ]
    },
    {
        "id": "77d83e17f6b20314",
        "type": "inject",
        "z": "49df5f85259a72e4",
        "name": "",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "start",
        "payloadType": "str",
        "x": 995,
        "y": 400,
        "wires": [
            [
                "b9e408deba1c5769"
            ]
        ]
    },
    {
        "id": "d660ff61f0b7e1f1",
        "type": "inject",
        "z": "49df5f85259a72e4",
        "name": "",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "stop",
        "payloadType": "str",
        "x": 995,
        "y": 420,
        "wires": [
            [
                "b9e408deba1c5769"
            ]
        ]
    },
    {
        "id": "9ce16d63c670a407",
        "type": "link out",
        "z": "49df5f85259a72e4",
        "name": "Dimmer0",
        "mode": "link",
        "links": [
            "a4c0fd66546e7864"
        ],
        "x": 1075,
        "y": 220,
        "wires": []
    },
    {
        "id": "1c9d36ae20e630f4",
        "type": "switch",
        "z": "49df5f85259a72e4",
        "name": "",
        "property": "LastDimmerUsed",
        "propertyType": "flow",
        "rules": [
            {
                "t": "eq",
                "v": "0",
                "vt": "num"
            },
            {
                "t": "eq",
                "v": "1",
                "vt": "num"
            },
            {
                "t": "eq",
                "v": "2",
                "vt": "num"
            },
            {
                "t": "eq",
                "v": "3",
                "vt": "num"
            },
            {
                "t": "eq",
                "v": "4",
                "vt": "num"
            },
            {
                "t": "eq",
                "v": "5",
                "vt": "num"
            },
            {
                "t": "eq",
                "v": "6",
                "vt": "num"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 7,
        "x": 975,
        "y": 260,
        "wires": [
            [
                "9ce16d63c670a407"
            ],
            [
                "7481795055327615"
            ],
            [
                "d9956cbc7c9075e0"
            ],
            [
                "83a5708a031e41f6"
            ],
            [
                "f3b371a077d14ea0"
            ],
            [
                "df4ecf42d055e0bc"
            ],
            [
                "6d586d6a276fdcc5"
            ]
        ]
    },
    {
        "id": "83a5708a031e41f6",
        "type": "link out",
        "z": "49df5f85259a72e4",
        "name": "Dimmer3",
        "mode": "link",
        "links": [
            "4896e98db77c2f91"
        ],
        "x": 1075,
        "y": 280,
        "wires": []
    },
    {
        "id": "7481795055327615",
        "type": "link out",
        "z": "49df5f85259a72e4",
        "name": "Dimmer1",
        "mode": "link",
        "links": [
            "1db51e9f7fe5ebea"
        ],
        "x": 1075,
        "y": 240,
        "wires": []
    },
    {
        "id": "d9956cbc7c9075e0",
        "type": "link out",
        "z": "49df5f85259a72e4",
        "name": "Dimmer2",
        "mode": "link",
        "links": [
            "09bf8b5862924eed"
        ],
        "x": 1075,
        "y": 260,
        "wires": []
    },
    {
        "id": "6d586d6a276fdcc5",
        "type": "link out",
        "z": "49df5f85259a72e4",
        "name": "Dimmer6",
        "mode": "link",
        "links": [
            "d4e73c36b453526a"
        ],
        "x": 1075,
        "y": 340,
        "wires": []
    },
    {
        "id": "f3b371a077d14ea0",
        "type": "link out",
        "z": "49df5f85259a72e4",
        "name": "Dimmer4",
        "mode": "link",
        "links": [
            "77683cc8a2a2dd71"
        ],
        "x": 1075,
        "y": 300,
        "wires": []
    },
    {
        "id": "df4ecf42d055e0bc",
        "type": "link out",
        "z": "49df5f85259a72e4",
        "name": "Dimmer5",
        "mode": "link",
        "links": [
            "2530d817d07d6ef2"
        ],
        "x": 1075,
        "y": 320,
        "wires": []
    },
    {
        "id": "a07aeee0ca181966",
        "type": "switch",
        "z": "49df5f85259a72e4",
        "name": "",
        "property": "IsDimming",
        "propertyType": "flow",
        "rules": [
            {
                "t": "neq",
                "v": "1",
                "vt": "num"
            },
            {
                "t": "else"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 2,
        "x": 615,
        "y": 120,
        "wires": [
            [
                "f6712e7ef4452f2b"
            ],
            [
                "7d1e67f4e846fd50"
            ]
        ]
    },
    {
        "id": "7d1e67f4e846fd50",
        "type": "function",
        "z": "49df5f85259a72e4",
        "name": "function stop",
        "func": "flow.set(\"IsDimming\", 0);\nmsg.payload = \"stop\"\nreturn msg;",
        "outputs": 1,
        "timeout": 0,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 835,
        "y": 140,
        "wires": [
            [
                "b9e408deba1c5769"
            ]
        ]
    },
    {
        "id": "fa0e52d06a45ed07",
        "type": "switch",
        "z": "49df5f85259a72e4",
        "name": "Taster 1 Action",
        "property": "payload.action",
        "propertyType": "msg",
        "rules": [
            {
                "t": "eq",
                "v": "1_single",
                "vt": "str"
            },
            {
                "t": "eq",
                "v": "1_double",
                "vt": "str"
            },
            {
                "t": "eq",
                "v": "1_hold",
                "vt": "str"
            },
            {
                "t": "eq",
                "v": "2_single",
                "vt": "str"
            },
            {
                "t": "eq",
                "v": "2_double",
                "vt": "str"
            },
            {
                "t": "eq",
                "v": "2_hold",
                "vt": "str"
            },
            {
                "t": "eq",
                "v": "3_single",
                "vt": "str"
            },
            {
                "t": "eq",
                "v": "3_double",
                "vt": "str"
            },
            {
                "t": "eq",
                "v": "3_hold",
                "vt": "str"
            },
            {
                "t": "eq",
                "v": "4_single",
                "vt": "str"
            },
            {
                "t": "eq",
                "v": "4_double",
                "vt": "str"
            },
            {
                "t": "eq",
                "v": "4_hold",
                "vt": "str"
            }
        ],
        "checkall": "false",
        "repair": false,
        "outputs": 12,
        "x": 295,
        "y": 260,
        "wires": [
            [
                "4de29f6cd079bd35"
            ],
            [
                "92204384ab5eaeae"
            ],
            [
                "63c079d12583c103"
            ],
            [
                "90b2d1846b326119"
            ],
            [],
            [],
            [
                "71b4d62b2009a919"
            ],
            [],
            [],
            [
                "48082932dbab877c"
            ],
            [],
            []
        ]
    },
    {
        "id": "4de29f6cd079bd35",
        "type": "function",
        "z": "49df5f85259a72e4",
        "name": "Taste 1 single",
        "func": "if(global.get(\"dimmer0\") == 0)\n    msg.payload = \"on\";\nelse\n    msg.payload = \"off\";\nflow.set(\"LastDimmerUsed\", 0);\nreturn msg;",
        "outputs": 1,
        "timeout": 0,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 495,
        "y": 120,
        "wires": [
            [
                "a07aeee0ca181966"
            ]
        ]
    },
    {
        "id": "92204384ab5eaeae",
        "type": "function",
        "z": "49df5f85259a72e4",
        "name": "Taste 1 double",
        "func": "msg.payload = 0;\nreturn msg;",
        "outputs": 1,
        "timeout": 0,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 575,
        "y": 160,
        "wires": [
            [
                "1e5a8eb1129b6c8d"
            ]
        ]
    },
    {
        "id": "63c079d12583c103",
        "type": "function",
        "z": "49df5f85259a72e4",
        "name": "Taste 1 hold",
        "func": "flow.set(\"IsDimming\", 1);\nmsg.payload = \"start\";\nreturn msg;",
        "outputs": 1,
        "timeout": 0,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 615,
        "y": 200,
        "wires": [
            [
                "b9e408deba1c5769"
            ]
        ]
    },
    {
        "id": "90b2d1846b326119",
        "type": "function",
        "z": "49df5f85259a72e4",
        "name": "Taste 2 single",
        "func": "if(global.get(\"dimmer1\") == 0)\n    msg.payload = \"on\";\nelse\n    msg.payload = \"off\";\nflow.set(\"LastDimmerUsed\", 1);\nreturn msg;\n\n",
        "outputs": 1,
        "timeout": 0,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 495,
        "y": 240,
        "wires": [
            []
        ]
    },
    {
        "id": "71b4d62b2009a919",
        "type": "function",
        "z": "49df5f85259a72e4",
        "name": "Taste 3 single",
        "func": "if(global.get(\"dimmer2\") == 0)\n    msg.payload = \"on\";\nelse\n    msg.payload = \"off\";\nflow.set(\"LastDimmerUsed\", 2);\nreturn msg;\n\n",
        "outputs": 1,
        "timeout": 0,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 495,
        "y": 280,
        "wires": [
            []
        ]
    },
    {
        "id": "48082932dbab877c",
        "type": "function",
        "z": "49df5f85259a72e4",
        "name": "Taste 4 single",
        "func": "if(global.get(\"dimmer3\") == 0)\n    msg.payload = \"on\";\nelse\n    msg.payload = \"off\";\nflow.set(\"LastDimmerUsed\", 3);\nreturn msg;\n\n",
        "outputs": 1,
        "timeout": 0,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 495,
        "y": 320,
        "wires": [
            []
        ]
    },
    {
        "id": "0ddb07c65cbb68bc",
        "type": "mqtt-broker",
        "name": "",
        "broker": "http://localhost",
        "port": "1883",
        "clientid": "",
        "autoConnect": true,
        "usetls": false,
        "protocolVersion": "4",
        "keepalive": "60",
        "cleansession": true,
        "autoUnsubscribe": true,
        "birthTopic": "",
        "birthQos": "0",
        "birthPayload": "",
        "birthMsg": {},
        "closeTopic": "",
        "closeQos": "0",
        "closePayload": "",
        "closeMsg": {},
        "willTopic": "",
        "willQos": "0",
        "willPayload": "",
        "willMsg": {},
        "sessionExpiry": ""
    },
    {
        "id": "5b472defad86d1b3",
        "type": "ui_group",
        "name": "Zigbee",
        "tab": "370ffb22e0695244",
        "order": 5,
        "disp": true,
        "width": "6",
        "collapse": false
    },
    {
        "id": "c3c038ded1f61252",
        "type": "zigbee2mqtt-server",
        "name": "",
        "host": "pekaway.local",
        "mqtt_port": "1883",
        "mqtt_username": "",
        "mqtt_password": "",
        "mqtt_qos": "0",
        "tls": "4230868a2749a2ba",
        "usetls": false,
        "base_topic": "zigbee2mqtt"
    },
    {
        "id": "370ffb22e0695244",
        "type": "ui_tab",
        "name": "Einstellungen",
        "icon": "dashboard",
        "order": 6,
        "disabled": false,
        "hidden": false
    },
    {
        "id": "4230868a2749a2ba",
        "type": "tls-config",
        "name": "",
        "cert": "",
        "key": "",
        "ca": "",
        "certname": "",
        "keyname": "",
        "caname": "",
        "servername": "",
        "verifyservercert": false,
        "alpnprotocol": ""
    }
]