[
   {
       "id": "2cc07195.fb6b8e",
       "type": "subflow",
       "name": "Automatik",
       "info": "# Standardfunktion\n\nSchaltet das Licht getriggert durch Präsenzmelder, entweder durch Helligkeit oder Präsenz. Die Nachrichten dienen jedoch nur als Trigger und die Werte werden nicht verwendet. \nMan kann auch nur den Präsenztrigger oder nur den Helligkeitstrigger verwenden.\n\nDie Werte werden intern ausgelesen, in dem an das Topic als Pfad \"illuminance\" oder \"occupancy\" angehängt werden.\n\n2 Licht Level sind entscheidend für 3 Optionen:\n\n * On-Level: Unter diesem Helligkeitslevel steuert die Präsenz true=on und false=off das Licht.\n * Off-Level: Über diesem Level wird das Licht immer abgeschaltet - unabhängig ob an- oder abwesend.\n * Unter dem Off-Level wird bei abwesend ausgeschaltet, aber nicht mehr eingeschaltet. Ist jedoch jemand anwesend, bleibt das Licht in diesem Zwischenlevel eingeschaltet.\n \n## Optionen:\nDas Standardverhalten kann, wie folgt geändert werden:\n - `msg.blockOff` - liest einen Datenpunkt aus, der true/false liefern muss. Liefert der Datenpunkt true, wird bei Anwesenheit das Licht unter dem On-Level eingeschaltet, aber bei Abwesenheit nicht ausgeschaltet.\n - `msg.level` - Objekt mit On und Off - als nummerische Werte, um die Standardlevels von 10 (level.On) und 20 (level.Off) zu überschreiben.\n - `msg.differentIlluminanceSensor` kann ein Datenpunkt angegeben werden, der einen anderen Sensor zur Helligkeitsmessung verwendet.",
       "category": "Licht",
       "in": [
           {
               "x": 60,
               "y": 220,
               "wires": [
                   {
                       "id": "7d8625c0.270b0c"
                   }
               ]
           }
       ],
       "out": [
           {
               "x": 3880,
               "y": 220,
               "wires": [
                   {
                       "id": "a1913266.b7a64",
                       "port": 0
                   },
                   {
                       "id": "a3759e52.8d6d5",
                       "port": 0
                   }
               ]
           },
           {
               "x": 3640,
               "y": 480,
               "wires": [
                   {
                       "id": "596a348d.60d00c",
                       "port": 0
                   },
                   {
                       "id": "83cc4a6f.b425b8",
                       "port": "1"
                   },
                   {
                       "id": "7619683d.ee6d08",
                       "port": 0
                   }
               ]
           }
       ],
       "env": [],
       "color": "#FDF0C2",
       "outputLabels": [
           "on/off = Licht an oder aus",
           "false/true = Präsenz für Entscheidung"
       ],
       "icon": "node-red/light.svg",
       "status": {
           "x": 1720,
           "y": 300,
           "wires": [
               {
                   "id": "af0d09af.81ce18",
                   "port": 0
               }
           ]
       }
   },
   {
       "id": "e736cf60.2f42a",
       "type": "change",
       "z": "2cc07195.fb6b8e",
       "name": "to Number",
       "rules": [
           {
               "t": "set",
               "p": "payload",
               "pt": "msg",
               "to": "$number(msg.payload)\t",
               "tot": "jsonata"
           }
       ],
       "action": "",
       "property": "",
       "from": "",
       "to": "",
       "reg": false,
       "x": 2410,
       "y": 260,
       "wires": [
           [
               "a2314ead.ae2f2",
               "450b0c8a.d98aa4"
           ]
       ]
   },
   {
       "id": "a1913266.b7a64",
       "type": "change",
       "z": "2cc07195.fb6b8e",
       "name": "Licht = off",
       "rules": [
           {
               "t": "set",
               "p": "payload",
               "pt": "msg",
               "to": "off",
               "tot": "str"
           }
       ],
       "action": "",
       "property": "",
       "from": "",
       "to": "",
       "reg": false,
       "x": 3680,
       "y": 240,
       "wires": [
           []
       ]
   },
   {
       "id": "a3759e52.8d6d5",
       "type": "change",
       "z": "2cc07195.fb6b8e",
       "name": "translate",
       "rules": [
           {
               "t": "change",
               "p": "payload",
               "pt": "msg",
               "from": "true",
               "fromt": "bool",
               "to": "on",
               "tot": "str"
           },
           {
               "t": "change",
               "p": "payload",
               "pt": "msg",
               "from": "false",
               "fromt": "bool",
               "to": "off",
               "tot": "str"
           }
       ],
       "action": "",
       "property": "",
       "from": "",
       "to": "",
       "reg": false,
       "x": 3680,
       "y": 180,
       "wires": [
           []
       ]
   },
   {
       "id": "596a348d.60d00c",
       "type": "switch",
       "z": "2cc07195.fb6b8e",
       "name": "= false",
       "property": "payload",
       "propertyType": "msg",
       "rules": [
           {
               "t": "false"
           }
       ],
       "checkall": "true",
       "repair": false,
       "outputs": 1,
       "x": 3390,
       "y": 480,
       "wires": [
           [
               "a1913266.b7a64"
           ]
       ]
   },
   {
       "id": "d3d0cae1.c8b4b8",
       "type": "switch",
       "z": "2cc07195.fb6b8e",
       "name": "gLicht ?",
       "property": "gLicht",
       "propertyType": "global",
       "rules": [
           {
               "t": "eq",
               "v": "off",
               "vt": "str"
           },
           {
               "t": "eq",
               "v": "on",
               "vt": "str"
           }
       ],
       "checkall": "true",
       "repair": false,
       "outputs": 2,
       "x": 3100,
       "y": 260,
       "wires": [
           [
               "a1913266.b7a64"
           ],
           [
               "28577d78.21e272"
           ]
       ]
   },
   {
       "id": "a7920e08.78d6a",
       "type": "change",
       "z": "2cc07195.fb6b8e",
       "name": "Define topics",
       "rules": [
           {
               "t": "set",
               "p": "fTopicIlluminace",
               "pt": "flow",
               "to": "payload & \"/illuminance\"",
               "tot": "jsonata"
           },
           {
               "t": "set",
               "p": "fTopicOccupancy",
               "pt": "flow",
               "to": "payload & \"/occupancy\"",
               "tot": "jsonata"
           }
       ],
       "action": "",
       "property": "",
       "from": "",
       "to": "",
       "reg": false,
       "x": 850,
       "y": 220,
       "wires": [
           [
               "2eb4595b.2652a6",
               "20c6e147.ba639e"
           ]
       ]
   },
   {
       "id": "be9e3607.2d4388",
       "type": "change",
       "z": "2cc07195.fb6b8e",
       "name": "",
       "rules": [
           {
               "t": "set",
               "p": "topic",
               "pt": "msg",
               "to": "fTopicIlluminace",
               "tot": "flow"
           }
       ],
       "action": "",
       "property": "",
       "from": "",
       "to": "",
       "reg": false,
       "x": 1340,
       "y": 60,
       "wires": [
           [
               "23bb673c.06c4c8"
           ]
       ]
   },
   {
       "id": "2eb4595b.2652a6",
       "type": "change",
       "z": "2cc07195.fb6b8e",
       "name": "",
       "rules": [
           {
               "t": "set",
               "p": "topic",
               "pt": "msg",
               "to": "fTopicOccupancy",
               "tot": "flow"
           }
       ],
       "action": "",
       "property": "",
       "from": "",
       "to": "",
       "reg": false,
       "x": 1060,
       "y": 260,
       "wires": [
           [
               "1b8306b4.840a99",
               "1043128.8f5ffee"
           ]
       ]
   },
   {
       "id": "23bb673c.06c4c8",
       "type": "ioBroker get",
       "z": "2cc07195.fb6b8e",
       "name": "",
       "topic": "",
       "attrname": "payload",
       "payloadType": "value",
       "x": 1530,
       "y": 60,
       "wires": [
           [
               "a4be4f25.58cba"
           ]
       ]
   },
   {
       "id": "1b8306b4.840a99",
       "type": "ioBroker get",
       "z": "2cc07195.fb6b8e",
       "name": "",
       "topic": "",
       "attrname": "payload",
       "payloadType": "value",
       "x": 1370,
       "y": 260,
       "wires": [
           [
               "79e4a500.79734c",
               "af0d09af.81ce18"
           ]
       ]
   },
   {
       "id": "68c985e.c9cc07c",
       "type": "change",
       "z": "2cc07195.fb6b8e",
       "name": "Identify",
       "rules": [
           {
               "t": "set",
               "p": "payload",
               "pt": "msg",
               "to": "topic",
               "tot": "msg"
           },
           {
               "t": "change",
               "p": "payload",
               "pt": "msg",
               "from": ".",
               "fromt": "str",
               "to": "/",
               "tot": "str"
           },
           {
               "t": "change",
               "p": "payload",
               "pt": "msg",
               "from": "(\\S*)\\/.*$",
               "fromt": "re",
               "to": "$1",
               "tot": "str"
           }
       ],
       "action": "",
       "property": "",
       "from": "",
       "to": "",
       "reg": false,
       "x": 680,
       "y": 220,
       "wires": [
           [
               "a7920e08.78d6a"
           ]
       ]
   },
   {
       "id": "a4be4f25.58cba",
       "type": "change",
       "z": "2cc07195.fb6b8e",
       "name": "",
       "rules": [
           {
               "t": "set",
               "p": "fHelligkeit",
               "pt": "flow",
               "to": "payload",
               "tot": "msg"
           }
       ],
       "action": "",
       "property": "",
       "from": "",
       "to": "",
       "reg": false,
       "x": 1740,
       "y": 60,
       "wires": [
           [
               "612f0788.c5e618"
           ]
       ]
   },
   {
       "id": "79e4a500.79734c",
       "type": "change",
       "z": "2cc07195.fb6b8e",
       "name": "",
       "rules": [
           {
               "t": "set",
               "p": "fPräsenz",
               "pt": "flow",
               "to": "payload",
               "tot": "msg"
           }
       ],
       "action": "",
       "property": "",
       "from": "",
       "to": "",
       "reg": false,
       "x": 1570,
       "y": 260,
       "wires": [
           [
               "612f0788.c5e618"
           ]
       ]
   },
   {
       "id": "df7213b8.015d1",
       "type": "change",
       "z": "2cc07195.fb6b8e",
       "name": "Helligkeit",
       "rules": [
           {
               "t": "set",
               "p": "payload",
               "pt": "msg",
               "to": "fHelligkeit",
               "tot": "flow"
           }
       ],
       "action": "",
       "property": "",
       "from": "",
       "to": "",
       "reg": false,
       "x": 2240,
       "y": 260,
       "wires": [
           [
               "e736cf60.2f42a"
           ]
       ]
   },
   {
       "id": "5e826235.20a2ac",
       "type": "change",
       "z": "2cc07195.fb6b8e",
       "name": "Präsenz",
       "rules": [
           {
               "t": "set",
               "p": "payload",
               "pt": "msg",
               "to": "fPräsenz",
               "tot": "flow"
           }
       ],
       "action": "",
       "property": "",
       "from": "",
       "to": "",
       "reg": false,
       "x": 3060,
       "y": 140,
       "wires": [
           [
               "83cc4a6f.b425b8",
               "ba687478.aa9248"
           ]
       ]
   },
   {
       "id": "28577d78.21e272",
       "type": "change",
       "z": "2cc07195.fb6b8e",
       "name": "Präsenz",
       "rules": [
           {
               "t": "set",
               "p": "payload",
               "pt": "msg",
               "to": "fPräsenz",
               "tot": "flow"
           }
       ],
       "action": "",
       "property": "",
       "from": "",
       "to": "",
       "reg": false,
       "x": 3060,
       "y": 480,
       "wires": [
           [
               "596a348d.60d00c"
           ]
       ]
   },
   {
       "id": "7d8625c0.270b0c",
       "type": "switch",
       "z": "2cc07195.fb6b8e",
       "name": "Ist gLichtautomatik = auto ?",
       "property": "gLichtautomatik",
       "propertyType": "global",
       "rules": [
           {
               "t": "eq",
               "v": "auto",
               "vt": "str"
           }
       ],
       "checkall": "true",
       "repair": false,
       "outputs": 1,
       "x": 240,
       "y": 220,
       "wires": [
           [
               "2c9575b4.b3a1da",
               "4e3912d3.5f411c"
           ]
       ]
   },
   {
       "id": "20c6e147.ba639e",
       "type": "switch",
       "z": "2cc07195.fb6b8e",
       "name": "differentIlluminanceSensor ?",
       "property": "differentIlluminanceSensor",
       "propertyType": "msg",
       "rules": [
           {
               "t": "null"
           },
           {
               "t": "else"
           }
       ],
       "checkall": "true",
       "repair": false,
       "outputs": 2,
       "x": 1080,
       "y": 80,
       "wires": [
           [
               "26cda5d2.1729ca",
               "be9e3607.2d4388"
           ],
           [
               "51ca8ffe.70cd2",
               "6964139c.8c847c"
           ]
       ]
   },
   {
       "id": "26cda5d2.1729ca",
       "type": "debug",
       "z": "2cc07195.fb6b8e",
       "d": true,
       "name": "undefined",
       "active": true,
       "tosidebar": true,
       "console": false,
       "tostatus": false,
       "complete": "payload",
       "targetType": "msg",
       "statusVal": "",
       "statusType": "auto",
       "x": 1320,
       "y": 20,
       "wires": []
   },
   {
       "id": "51ca8ffe.70cd2",
       "type": "debug",
       "z": "2cc07195.fb6b8e",
       "d": true,
       "name": "differentIlluminanceSensor",
       "active": true,
       "tosidebar": true,
       "console": false,
       "tostatus": false,
       "complete": "payload",
       "targetType": "msg",
       "x": 1380,
       "y": 160,
       "wires": []
   },
   {
       "id": "6964139c.8c847c",
       "type": "change",
       "z": "2cc07195.fb6b8e",
       "name": "",
       "rules": [
           {
               "t": "set",
               "p": "topic",
               "pt": "msg",
               "to": "differentIlluminanceSensor",
               "tot": "msg"
           }
       ],
       "action": "",
       "property": "",
       "from": "",
       "to": "",
       "reg": false,
       "x": 1340,
       "y": 120,
       "wires": [
           [
               "44f0728b.a891bc"
           ]
       ]
   },
   {
       "id": "44f0728b.a891bc",
       "type": "ioBroker get",
       "z": "2cc07195.fb6b8e",
       "name": "",
       "topic": "",
       "attrname": "payload",
       "payloadType": "value",
       "x": 1530,
       "y": 120,
       "wires": [
           [
               "ac87e4f.ad4a818"
           ]
       ]
   },
   {
       "id": "ac87e4f.ad4a818",
       "type": "change",
       "z": "2cc07195.fb6b8e",
       "name": "",
       "rules": [
           {
               "t": "set",
               "p": "fHelligkeit",
               "pt": "flow",
               "to": "payload",
               "tot": "msg"
           }
       ],
       "action": "",
       "property": "",
       "from": "",
       "to": "",
       "reg": false,
       "x": 1740,
       "y": 120,
       "wires": [
           [
               "612f0788.c5e618"
           ]
       ]
   },
   {
       "id": "725b8b7c.c46724",
       "type": "switch",
       "z": "2cc07195.fb6b8e",
       "name": "blockOff ?",
       "property": "blockOff",
       "propertyType": "msg",
       "rules": [
           {
               "t": "null"
           },
           {
               "t": "else"
           }
       ],
       "checkall": "true",
       "repair": false,
       "outputs": 2,
       "x": 720,
       "y": 380,
       "wires": [
           [
               "9b1825b.7f06ad8"
           ],
           [
               "d84afaef.08ca08"
           ]
       ]
   },
   {
       "id": "d84afaef.08ca08",
       "type": "change",
       "z": "2cc07195.fb6b8e",
       "name": "",
       "rules": [
           {
               "t": "set",
               "p": "topic",
               "pt": "msg",
               "to": "blockOff",
               "tot": "msg"
           }
       ],
       "action": "",
       "property": "",
       "from": "",
       "to": "",
       "reg": false,
       "x": 900,
       "y": 400,
       "wires": [
           [
               "f495ba59.100cd8"
           ]
       ]
   },
   {
       "id": "f495ba59.100cd8",
       "type": "ioBroker get",
       "z": "2cc07195.fb6b8e",
       "name": "",
       "topic": "",
       "attrname": "payload",
       "payloadType": "value",
       "x": 1090,
       "y": 400,
       "wires": [
           [
               "409a5f7c.3b997"
           ]
       ]
   },
   {
       "id": "9b1825b.7f06ad8",
       "type": "change",
       "z": "2cc07195.fb6b8e",
       "name": "",
       "rules": [
           {
               "t": "set",
               "p": "fBlockOff",
               "pt": "flow",
               "to": "false",
               "tot": "bool"
           }
       ],
       "action": "",
       "property": "",
       "from": "",
       "to": "",
       "reg": false,
       "x": 910,
       "y": 360,
       "wires": [
           []
       ]
   },
   {
       "id": "409a5f7c.3b997",
       "type": "change",
       "z": "2cc07195.fb6b8e",
       "name": "",
       "rules": [
           {
               "t": "set",
               "p": "fBlockOff",
               "pt": "flow",
               "to": "payload",
               "tot": "msg"
           }
       ],
       "action": "",
       "property": "",
       "from": "",
       "to": "",
       "reg": false,
       "x": 1290,
       "y": 400,
       "wires": [
           []
       ]
   },
   {
       "id": "f8345bc7.8cfbe8",
       "type": "change",
       "z": "2cc07195.fb6b8e",
       "name": "debug blockOff",
       "rules": [
           {
               "t": "set",
               "p": "payload",
               "pt": "msg",
               "to": "fBlockOff",
               "tot": "flow"
           }
       ],
       "action": "",
       "property": "",
       "from": "",
       "to": "",
       "reg": false,
       "x": 2220,
       "y": 320,
       "wires": [
           [
               "99359e6b.17f01",
               "97f9290c.dd19c8"
           ]
       ]
   },
   {
       "id": "99359e6b.17f01",
       "type": "debug",
       "z": "2cc07195.fb6b8e",
       "d": true,
       "name": "debug blockOff",
       "active": true,
       "tosidebar": true,
       "console": false,
       "tostatus": false,
       "complete": "payload",
       "targetType": "msg",
       "statusVal": "",
       "statusType": "auto",
       "x": 2440,
       "y": 320,
       "wires": []
   },
   {
       "id": "83cc4a6f.b425b8",
       "type": "switch",
       "z": "2cc07195.fb6b8e",
       "name": "",
       "property": "payload",
       "propertyType": "msg",
       "rules": [
           {
               "t": "false"
           },
           {
               "t": "true"
           }
       ],
       "checkall": "true",
       "repair": false,
       "outputs": 2,
       "x": 3230,
       "y": 140,
       "wires": [
           [
               "7619683d.ee6d08"
           ],
           [
               "a3759e52.8d6d5"
           ]
       ]
   },
   {
       "id": "7619683d.ee6d08",
       "type": "switch",
       "z": "2cc07195.fb6b8e",
       "name": "fBlockOff = false?",
       "property": "fBlockOff",
       "propertyType": "flow",
       "rules": [
           {
               "t": "false"
           }
       ],
       "checkall": "true",
       "repair": false,
       "outputs": 1,
       "x": 3410,
       "y": 120,
       "wires": [
           [
               "a3759e52.8d6d5",
               "13d1d0d8.071e3f"
           ]
       ]
   },
   {
       "id": "2c9575b4.b3a1da",
       "type": "trigger",
       "z": "2cc07195.fb6b8e",
       "name": "",
       "op1": "",
       "op2": "",
       "op1type": "nul",
       "op2type": "payl",
       "duration": "100",
       "extend": true,
       "units": "ms",
       "reset": "",
       "bytopic": "all",
       "outputs": 1,
       "x": 480,
       "y": 220,
       "wires": [
           [
               "68c985e.c9cc07c",
               "725b8b7c.c46724",
               "564d92bf.d3499c"
           ]
       ]
   },
   {
       "id": "612f0788.c5e618",
       "type": "trigger",
       "z": "2cc07195.fb6b8e",
       "name": "",
       "op1": "",
       "op2": "",
       "op1type": "nul",
       "op2type": "payl",
       "duration": "100",
       "extend": true,
       "units": "ms",
       "reset": "",
       "bytopic": "all",
       "outputs": 1,
       "x": 2020,
       "y": 260,
       "wires": [
           [
               "f8345bc7.8cfbe8",
               "df7213b8.015d1"
           ]
       ]
   },
   {
       "id": "564d92bf.d3499c",
       "type": "switch",
       "z": "2cc07195.fb6b8e",
       "name": "level ?",
       "property": "level",
       "propertyType": "msg",
       "rules": [
           {
               "t": "null"
           },
           {
               "t": "else"
           }
       ],
       "checkall": "true",
       "repair": false,
       "outputs": 2,
       "x": 670,
       "y": 500,
       "wires": [
           [
               "84067941.fa6c28"
           ],
           [
               "e08747e9.e1d9f8"
           ]
       ]
   },
   {
       "id": "84067941.fa6c28",
       "type": "change",
       "z": "2cc07195.fb6b8e",
       "name": "Define levels",
       "rules": [
           {
               "t": "set",
               "p": "fLevel.On",
               "pt": "flow",
               "to": "10",
               "tot": "num"
           },
           {
               "t": "set",
               "p": "fLevel.Off",
               "pt": "flow",
               "to": "20",
               "tot": "num"
           },
           {
               "t": "set",
               "p": "payload",
               "pt": "msg",
               "to": "fLevel",
               "tot": "flow"
           }
       ],
       "action": "",
       "property": "",
       "from": "",
       "to": "",
       "reg": false,
       "x": 850,
       "y": 480,
       "wires": [
           [
               "8a28727d.3669c"
           ]
       ]
   },
   {
       "id": "8a28727d.3669c",
       "type": "debug",
       "z": "2cc07195.fb6b8e",
       "d": true,
       "name": "currentLevels",
       "active": true,
       "tosidebar": true,
       "console": false,
       "tostatus": false,
       "complete": "payload",
       "targetType": "msg",
       "statusVal": "",
       "statusType": "auto",
       "x": 1080,
       "y": 500,
       "wires": []
   },
   {
       "id": "e08747e9.e1d9f8",
       "type": "change",
       "z": "2cc07195.fb6b8e",
       "name": "Define levels",
       "rules": [
           {
               "t": "set",
               "p": "fLevel.On",
               "pt": "flow",
               "to": "level.On",
               "tot": "msg"
           },
           {
               "t": "set",
               "p": "fLevel.Off",
               "pt": "flow",
               "to": "level.Off",
               "tot": "msg"
           },
           {
               "t": "set",
               "p": "payload",
               "pt": "msg",
               "to": "fLevel",
               "tot": "flow"
           }
       ],
       "action": "",
       "property": "",
       "from": "",
       "to": "",
       "reg": false,
       "x": 850,
       "y": 520,
       "wires": [
           [
               "8a28727d.3669c"
           ]
       ]
   },
   {
       "id": "a2314ead.ae2f2",
       "type": "switch",
       "z": "2cc07195.fb6b8e",
       "name": "fLevel.On < Lux > fLevel.Off",
       "property": "payload",
       "propertyType": "msg",
       "rules": [
           {
               "t": "lt",
               "v": "fLevel.On",
               "vt": "flow"
           },
           {
               "t": "gt",
               "v": "fLevel.Off",
               "vt": "flow"
           },
           {
               "t": "lte",
               "v": "fLevel.Off",
               "vt": "flow"
           }
       ],
       "checkall": "false",
       "repair": false,
       "outputs": 3,
       "x": 2700,
       "y": 260,
       "wires": [
           [
               "5e826235.20a2ac"
           ],
           [
               "d3d0cae1.c8b4b8"
           ],
           [
               "28577d78.21e272"
           ]
       ]
   },
   {
       "id": "450b0c8a.d98aa4",
       "type": "debug",
       "z": "2cc07195.fb6b8e",
       "d": true,
       "name": "Helligkeit",
       "active": true,
       "tosidebar": true,
       "console": false,
       "tostatus": false,
       "complete": "payload",
       "targetType": "msg",
       "statusVal": "",
       "statusType": "auto",
       "x": 2590,
       "y": 180,
       "wires": []
   },
   {
       "id": "ba687478.aa9248",
       "type": "debug",
       "z": "2cc07195.fb6b8e",
       "d": true,
       "name": "vor block",
       "active": true,
       "tosidebar": true,
       "console": false,
       "tostatus": false,
       "complete": "payload",
       "targetType": "msg",
       "statusVal": "",
       "statusType": "auto",
       "x": 3240,
       "y": 60,
       "wires": []
   },
   {
       "id": "13d1d0d8.071e3f",
       "type": "debug",
       "z": "2cc07195.fb6b8e",
       "d": true,
       "name": "nach block",
       "active": true,
       "tosidebar": true,
       "console": false,
       "tostatus": false,
       "complete": "payload",
       "targetType": "msg",
       "statusVal": "",
       "statusType": "auto",
       "x": 3610,
       "y": 60,
       "wires": []
   },
   {
       "id": "97f9290c.dd19c8",
       "type": "change",
       "z": "2cc07195.fb6b8e",
       "name": "status blockOff",
       "rules": [
           {
               "t": "set",
               "p": "payload",
               "pt": "msg",
               "to": "\"blockiere off = \" & payload ",
               "tot": "jsonata"
           }
       ],
       "action": "",
       "property": "",
       "from": "",
       "to": "",
       "reg": false,
       "x": 2420,
       "y": 400,
       "wires": [
           []
       ]
   },
   {
       "id": "af0d09af.81ce18",
       "type": "change",
       "z": "2cc07195.fb6b8e",
       "name": "topic & payload ",
       "rules": [
           {
               "t": "set",
               "p": "payload",
               "pt": "msg",
               "to": "topic & \" = \" & payload ",
               "tot": "jsonata"
           }
       ],
       "action": "",
       "property": "",
       "from": "",
       "to": "",
       "reg": false,
       "x": 1560,
       "y": 300,
       "wires": [
           []
       ]
   },
   {
       "id": "4e3912d3.5f411c",
       "type": "debug",
       "z": "2cc07195.fb6b8e",
       "d": true,
       "name": "Lichtautomatik Eingang",
       "active": true,
       "tosidebar": true,
       "console": false,
       "tostatus": false,
       "complete": "payload",
       "targetType": "msg",
       "statusVal": "",
       "statusType": "auto",
       "x": 540,
       "y": 160,
       "wires": []
   },
   {
       "id": "1043128.8f5ffee",
       "type": "debug",
       "z": "2cc07195.fb6b8e",
       "d": true,
       "name": "welcher Präsenzmelder",
       "active": true,
       "tosidebar": true,
       "console": false,
       "tostatus": false,
       "complete": "topic",
       "targetType": "msg",
       "statusVal": "",
       "statusType": "auto",
       "x": 1310,
       "y": 300,
       "wires": []
   },
   {
       "id": "d5156296.63584",
       "type": "debug",
       "z": "2821dd31.a0dd62",
       "name": "",
       "active": true,
       "tosidebar": true,
       "console": false,
       "tostatus": false,
       "complete": "false",
       "statusVal": "",
       "statusType": "auto",
       "x": 1770,
       "y": 1340,
       "wires": []
   },
   {
       "id": "63301386.4493ec",
       "type": "inject",
       "z": "2821dd31.a0dd62",
       "name": "",
       "props": [
           {
               "p": "payload"
           },
           {
               "p": "topic",
               "vt": "str"
           }
       ],
       "repeat": "",
       "crontab": "",
       "once": false,
       "onceDelay": 0.1,
       "topic": "",
       "payload": "Kann natürlich auch ein iobroker IN node sein",
       "payloadType": "str",
       "x": 840,
       "y": 1360,
       "wires": [
           [
               "d22cfac8.4174a8",
               "92eba9fc.5671e8"
           ]
       ]
   },
   {
       "id": "d22cfac8.4174a8",
       "type": "ioBroker get",
       "z": "2821dd31.a0dd62",
       "name": "Büro Anwesenheit Occupancy",
       "topic": "zigbee.0.00000000000000e1.occupancy",
       "attrname": "payload",
       "payloadType": "value",
       "x": 1080,
       "y": 1360,
       "wires": [
           [
               "87fd0691.9946b8",
               "7643056f.b963ac"
           ]
       ]
   },
   {
       "id": "92eba9fc.5671e8",
       "type": "change",
       "z": "2821dd31.a0dd62",
       "name": "",
       "rules": [
           {
               "t": "set",
               "p": "gLichtautomatik",
               "pt": "global",
               "to": "auto",
               "tot": "str"
           }
       ],
       "action": "",
       "property": "",
       "from": "",
       "to": "",
       "reg": false,
       "x": 1080,
       "y": 1300,
       "wires": [
           []
       ]
   },
   {
       "id": "87fd0691.9946b8",
       "type": "subflow:2cc07195.fb6b8e",
       "z": "2821dd31.a0dd62",
       "name": "",
       "env": [],
       "x": 1560,
       "y": 1360,
       "wires": [
           [
               "d5156296.63584"
           ],
           []
       ]
   },
   {
       "id": "7643056f.b963ac",
       "type": "change",
       "z": "2821dd31.a0dd62",
       "d": true,
       "name": "überschreibe Standards",
       "rules": [
           {
               "t": "set",
               "p": "level.On",
               "pt": "msg",
               "to": "90",
               "tot": "num"
           },
           {
               "t": "set",
               "p": "level.Off",
               "pt": "msg",
               "to": "120",
               "tot": "num"
           },
           {
               "t": "set",
               "p": "differentIlluminanceSensor",
               "pt": "msg",
               "to": "zigbee/0/1111111111111111/illuminance",
               "tot": "str"
           }
       ],
       "action": "",
       "property": "",
       "from": "",
       "to": "",
       "reg": false,
       "x": 1350,
       "y": 1420,
       "wires": [
           [
               "87fd0691.9946b8"
           ]
       ]
   }
]