[
  {
    "id": "503d4505e4a78f8f",
    "type": "group",
    "style": {
      "stroke": "#999999",
      "stroke-opacity": "1",
      "fill": "none",
      "fill-opacity": "1",
      "label": true,
      "label-position": "nw",
      "color": "#a4a4a4"
    },
    "nodes": [
      "ventilation_demo",
      "inject_auto_on",
      "inject_slow_on",
      "inject_medium_on",
      "inject_high_on",
      "inject_boost",
      "inject_auto_feedback",
      "inject_slow_feedback",
      "inject_medium_feedback",
      "inject_high_feedback",
      "inject_boost_feedback",
      "debug_auto",
      "debug_auto_feedback",
      "debug_slow",
      "debug_slow_feedback",
      "debug_medium",
      "debug_medium_feedback",
      "debug_high",
      "debug_high_feedback",
      "debug_boost",
      "debug_boost_feedback",
      "function_ventilation_sequence",
      "inject_sequence",
      "comment_ventilation_logic"
    ],
    "x": 1414,
    "y": 1809,
    "w": 1072,
    "h": 552
  },
  {
    "id": "ventilation_demo",
    "type": "widget-Ventilation",
    "g": "503d4505e4a78f8f",
    "dropdownRoom": "",
    "dropdownCategory": "",
    "dropdownWidget": "",
    "displayName": "Ventilation (set device)",
    "x": 1930,
    "y": 2080,
    "wires": [
      [
        "debug_auto"
      ],
      [
        "debug_auto_feedback"
      ],
      [
        "debug_slow"
      ],
      [
        "debug_slow_feedback"
      ],
      [
        "debug_medium"
      ],
      [
        "debug_medium_feedback"
      ],
      [
        "debug_high"
      ],
      [
        "debug_high_feedback"
      ],
      [
        "debug_boost"
      ],
      [
        "debug_boost_feedback"
      ]
    ]
  },
  {
    "id": "inject_auto_on",
    "type": "inject",
    "g": "503d4505e4a78f8f",
    "name": "Auto Mode",
    "props": [
      {
        "p": "inputTarget",
        "v": "Auto On/Off",
        "vt": "str"
      },
      {
        "p": "payload",
        "v": "true",
        "vt": "bool"
      }
    ],
    "repeat": "",
    "crontab": "",
    "once": false,
    "onceDelay": "0",
    "topic": "",
    "x": 1520,
    "y": 1920,
    "wires": [
      [
        "ventilation_demo"
      ]
    ]
  },
  {
    "id": "inject_slow_on",
    "type": "inject",
    "g": "503d4505e4a78f8f",
    "name": "Slow Speed",
    "props": [
      {
        "p": "inputTarget",
        "v": "Slow On/Off",
        "vt": "str"
      },
      {
        "p": "payload",
        "v": "true",
        "vt": "bool"
      }
    ],
    "repeat": "",
    "crontab": "",
    "once": false,
    "onceDelay": "0",
    "topic": "",
    "x": 1530,
    "y": 1960,
    "wires": [
      [
        "ventilation_demo"
      ]
    ]
  },
  {
    "id": "inject_medium_on",
    "type": "inject",
    "g": "503d4505e4a78f8f",
    "name": "Medium Speed",
    "props": [
      {
        "p": "inputTarget",
        "v": "Medium On/Off",
        "vt": "str"
      },
      {
        "p": "payload",
        "v": "true",
        "vt": "bool"
      }
    ],
    "repeat": "",
    "crontab": "",
    "once": false,
    "onceDelay": "0",
    "topic": "",
    "x": 1540,
    "y": 2000,
    "wires": [
      [
        "ventilation_demo"
      ]
    ]
  },
  {
    "id": "inject_high_on",
    "type": "inject",
    "g": "503d4505e4a78f8f",
    "name": "High Speed",
    "props": [
      {
        "p": "inputTarget",
        "v": "High On/Off",
        "vt": "str"
      },
      {
        "p": "payload",
        "v": "true",
        "vt": "bool"
      }
    ],
    "repeat": "",
    "crontab": "",
    "once": false,
    "onceDelay": "0",
    "topic": "",
    "x": 1530,
    "y": 2040,
    "wires": [
      [
        "ventilation_demo"
      ]
    ]
  },
  {
    "id": "inject_boost",
    "type": "inject",
    "g": "503d4505e4a78f8f",
    "name": "Boost",
    "props": [
      {
        "p": "inputTarget",
        "v": "Boost",
        "vt": "str"
      },
      {
        "p": "payload",
        "v": "true",
        "vt": "bool"
      }
    ],
    "repeat": "",
    "crontab": "",
    "once": false,
    "onceDelay": "0",
    "topic": "",
    "x": 1510,
    "y": 2080,
    "wires": [
      [
        "ventilation_demo"
      ]
    ]
  },
  {
    "id": "inject_auto_feedback",
    "type": "inject",
    "g": "503d4505e4a78f8f",
    "name": "Auto Feedback (feedback)",
    "props": [
      {
        "p": "inputTarget",
        "v": "Auto feedback",
        "vt": "str"
      },
      {
        "p": "payload",
        "v": "true",
        "vt": "bool"
      }
    ],
    "repeat": "",
    "crontab": "",
    "once": false,
    "onceDelay": "0",
    "topic": "",
    "x": 1570,
    "y": 2120,
    "wires": [
      [
        "ventilation_demo"
      ]
    ]
  },
  {
    "id": "inject_slow_feedback",
    "type": "inject",
    "g": "503d4505e4a78f8f",
    "name": "Slow Feedback (feedback)",
    "props": [
      {
        "p": "inputTarget",
        "v": "Slow feedback",
        "vt": "str"
      },
      {
        "p": "payload",
        "v": "true",
        "vt": "bool"
      }
    ],
    "repeat": "",
    "crontab": "",
    "once": false,
    "onceDelay": "0",
    "topic": "",
    "x": 1570,
    "y": 2160,
    "wires": [
      [
        "ventilation_demo"
      ]
    ]
  },
  {
    "id": "inject_medium_feedback",
    "type": "inject",
    "g": "503d4505e4a78f8f",
    "name": "Medium Feedback (feedback)",
    "props": [
      {
        "p": "inputTarget",
        "v": "Medium feedback",
        "vt": "str"
      },
      {
        "p": "payload",
        "v": "true",
        "vt": "bool"
      }
    ],
    "repeat": "",
    "crontab": "",
    "once": false,
    "onceDelay": "0",
    "topic": "",
    "x": 1580,
    "y": 2200,
    "wires": [
      [
        "ventilation_demo"
      ]
    ]
  },
  {
    "id": "inject_high_feedback",
    "type": "inject",
    "g": "503d4505e4a78f8f",
    "name": "High Feedback (feedback)",
    "props": [
      {
        "p": "inputTarget",
        "v": "High feedback",
        "vt": "str"
      },
      {
        "p": "payload",
        "v": "true",
        "vt": "bool"
      }
    ],
    "repeat": "",
    "crontab": "",
    "once": false,
    "onceDelay": "0",
    "topic": "",
    "x": 1570,
    "y": 2240,
    "wires": [
      [
        "ventilation_demo"
      ]
    ]
  },
  {
    "id": "inject_boost_feedback",
    "type": "inject",
    "g": "503d4505e4a78f8f",
    "name": "Boost Feedback (feedback)",
    "props": [
      {
        "p": "inputTarget",
        "v": "Boost feedback",
        "vt": "str"
      },
      {
        "p": "payload"
      }
    ],
    "repeat": "",
    "crontab": "",
    "once": false,
    "onceDelay": "0",
    "topic": "",
    "payload": "false",
    "payloadType": "bool",
    "x": 1580,
    "y": 2280,
    "wires": [
      [
        "ventilation_demo"
      ]
    ]
  },
  {
    "id": "debug_auto",
    "type": "debug",
    "g": "503d4505e4a78f8f",
    "name": "1 · Automatic On/Off (bool)",
    "active": true,
    "tosidebar": true,
    "console": false,
    "tostatus": false,
    "complete": "payload",
    "targetType": "msg",
    "statusVal": "",
    "statusType": "auto",
    "x": 2300,
    "y": 1920,
    "wires": []
  },
  {
    "id": "debug_auto_feedback",
    "type": "debug",
    "g": "503d4505e4a78f8f",
    "name": "2 · Automatic Feedback (bool)",
    "active": true,
    "tosidebar": true,
    "console": false,
    "tostatus": false,
    "complete": "payload",
    "targetType": "msg",
    "statusVal": "",
    "statusType": "auto",
    "x": 2310,
    "y": 1960,
    "wires": []
  },
  {
    "id": "debug_slow",
    "type": "debug",
    "g": "503d4505e4a78f8f",
    "name": "3 · Slow On/Off (bool)",
    "active": true,
    "tosidebar": true,
    "console": false,
    "tostatus": false,
    "complete": "payload",
    "targetType": "msg",
    "statusVal": "",
    "statusType": "auto",
    "x": 2280,
    "y": 2000,
    "wires": []
  },
  {
    "id": "debug_slow_feedback",
    "type": "debug",
    "g": "503d4505e4a78f8f",
    "name": "4 · Slow Feedback (bool)",
    "active": true,
    "tosidebar": true,
    "console": false,
    "tostatus": false,
    "complete": "payload",
    "targetType": "msg",
    "statusVal": "",
    "statusType": "auto",
    "x": 2290,
    "y": 2040,
    "wires": []
  },
  {
    "id": "debug_medium",
    "type": "debug",
    "g": "503d4505e4a78f8f",
    "name": "5 · Medium On/Off (bool)",
    "active": true,
    "tosidebar": true,
    "console": false,
    "tostatus": false,
    "complete": "payload",
    "targetType": "msg",
    "statusVal": "",
    "statusType": "auto",
    "x": 2290,
    "y": 2080,
    "wires": []
  },
  {
    "id": "debug_medium_feedback",
    "type": "debug",
    "g": "503d4505e4a78f8f",
    "name": "6 · Medium Feedback (bool)",
    "active": true,
    "tosidebar": true,
    "console": false,
    "tostatus": false,
    "complete": "payload",
    "targetType": "msg",
    "statusVal": "",
    "statusType": "auto",
    "x": 2300,
    "y": 2120,
    "wires": []
  },
  {
    "id": "debug_high",
    "type": "debug",
    "g": "503d4505e4a78f8f",
    "name": "7 · High On/Off (bool)",
    "active": true,
    "tosidebar": true,
    "console": false,
    "tostatus": false,
    "complete": "payload",
    "targetType": "msg",
    "statusVal": "",
    "statusType": "auto",
    "x": 2280,
    "y": 2160,
    "wires": []
  },
  {
    "id": "debug_high_feedback",
    "type": "debug",
    "g": "503d4505e4a78f8f",
    "name": "8 · High Feedback (bool)",
    "active": true,
    "tosidebar": true,
    "console": false,
    "tostatus": false,
    "complete": "payload",
    "targetType": "msg",
    "statusVal": "",
    "statusType": "auto",
    "x": 2290,
    "y": 2200,
    "wires": []
  },
  {
    "id": "debug_boost",
    "type": "debug",
    "g": "503d4505e4a78f8f",
    "name": "9 · Boost (bool)",
    "active": true,
    "tosidebar": true,
    "console": false,
    "tostatus": false,
    "complete": "payload",
    "targetType": "msg",
    "statusVal": "",
    "statusType": "auto",
    "x": 2260,
    "y": 2240,
    "wires": []
  },
  {
    "id": "debug_boost_feedback",
    "type": "debug",
    "g": "503d4505e4a78f8f",
    "name": "10 · Boost Feedback (bool)",
    "active": true,
    "tosidebar": true,
    "console": false,
    "tostatus": false,
    "complete": "payload",
    "targetType": "msg",
    "statusVal": "",
    "statusType": "auto",
    "x": 2300,
    "y": 2280,
    "wires": []
  },
  {
    "id": "function_ventilation_sequence",
    "type": "function",
    "g": "503d4505e4a78f8f",
    "name": "Ventilation Sequence",
    "func": "// Progressive ventilation sequence: Auto -> Slow -> Medium -> High -> Boost\nlet sequence = [\n    { inputTarget: \"Auto On/Off\", payload: true, delay: 0 },\n    { inputTarget: \"Slow On/Off\", payload: true, delay: 2000 },\n    { inputTarget: \"Medium On/Off\", payload: true, delay: 4000 },\n    { inputTarget: \"High On/Off\", payload: true, delay: 6000 },\n    { inputTarget: \"Boost\", payload: true, delay: 8000 }\n];\n\nnode.status({\n    fill: \"blue\",\n    shape: \"dot\", \n    text: \"🌪️ Running Sequence\"\n});\n\n// Send each message with delay\nsequence.forEach((msg, index) => {\n    setTimeout(() => {\n        node.send(msg);\n        if (index === sequence.length - 1) {\n            node.status({\n                fill: \"green\",\n                shape: \"dot\", \n                text: \"✅ Sequence Complete\"\n            });\n        }\n    }, msg.delay);\n});\n\nreturn null;",
    "outputs": 1,
    "timeout": 0,
    "noerr": 0,
    "initialize": "",
    "finalize": "",
    "libs": [],
    "x": 1780,
    "y": 2320,
    "wires": [
      [
        "ventilation_demo"
      ]
    ]
  },
  {
    "id": "inject_sequence",
    "type": "inject",
    "g": "503d4505e4a78f8f",
    "name": "Run Sequence",
    "props": [],
    "repeat": "",
    "crontab": "",
    "once": false,
    "onceDelay": "0",
    "topic": "",
    "x": 1540,
    "y": 2320,
    "wires": [
      [
        "function_ventilation_sequence"
      ]
    ]
  },
  {
    "id": "comment_ventilation_logic",
    "type": "comment",
    "g": "503d4505e4a78f8f",
    "name": "Communication Ventilation System",
    "info": "## Ventilation node\nDevice: double-click the device node and choose the device of your installation, then Deploy.\n\n### Input targets\n- `Auto On/Off`, `Slow On/Off`, `Medium On/Off`, `High On/Off`, `Boost` — commands, true / false\n- `Auto feedback`, `Slow feedback`, `Medium feedback`, `High feedback`, `Boost feedback` — feedback\n\n### Outputs\n1. Auto On/Off · 2. Auto feedback · 3. Slow On/Off · 4. Slow feedback · 5. Medium On/Off · 6. Medium feedback · 7. High On/Off · 8. High feedback · 9. Boost · 10. Boost feedback\n\n### Rules (node-red-cgen-widget-nodes 1.15)\n- `msg.inputTarget` must match a name above exactly (case-sensitive). Use an **Input Target** node to pick it from a list. A message with a missing or unknown target is ignored.\n- A message from the flow is sent to the server and also leaves on the output of the same name.\n- Outputs also fire when the device changes elsewhere: a **command** output when the app, a scenario, an automation or another flow commands it (only when the value changes), a **feedback** output each time the device reports a value.\n- Writing a feedback / status target updates the value HyperVisu shows; nothing is sent to the device. Use it with VIRTUAL devices.",
    "x": 1690,
    "y": 1850,
    "wires": []
  }
]