[
  {
    "id": "9ce6b60397d80678",
    "type": "group",
    "style": {
      "stroke": "#999999",
      "stroke-opacity": "1",
      "fill": "none",
      "fill-opacity": "1",
      "label": true,
      "label-position": "nw",
      "color": "#a4a4a4"
    },
    "nodes": [
      "cde03ee4d7fe9b45",
      "3e3d16cb6ece9c01",
      "b3e2aa120f5562b8",
      "f0b25aab3f10b2e6",
      "819835d24807e6f7",
      "07a04820deb46771",
      "127dc68a2ee5c552",
      "62f96ebea61b5f57",
      "406982b1b8e78832",
      "0226c961ca721fc1",
      "2583e073eccc696f",
      "b494dd399d4efd35",
      "547bb59e22c7cb73",
      "91810299a8961eb4",
      "a10f57ace9530cba",
      "fb6c8c33890cc998",
      "f4328869e9f88eb9",
      "2a73b41a2410725e",
      "3778b91b39108b3c",
      "41b97b99b3c658a8",
      "92dbccf8571b3909",
      "1c984f87c64f2b94",
      "963a73460f2a027a",
      "823d5a1c4e88859a",
      "9af9739812e8265f",
      "0fa9e1e88d42fe19",
      "55ca04852c56727f"
    ],
    "x": 74,
    "y": 2179,
    "w": 1112,
    "h": 622
  },
  {
    "id": "cde03ee4d7fe9b45",
    "type": "inject",
    "g": "9ce6b60397d80678",
    "name": "Brightness 50%",
    "props": [
      {
        "p": "payload"
      }
    ],
    "repeat": "",
    "crontab": "",
    "once": false,
    "onceDelay": "0",
    "topic": "",
    "payload": "50",
    "payloadType": "num",
    "x": 200,
    "y": 2500,
    "wires": [
      [
        "1c984f87c64f2b94"
      ]
    ]
  },
  {
    "id": "3e3d16cb6ece9c01",
    "type": "inject",
    "g": "9ce6b60397d80678",
    "name": "Brightness 100%",
    "props": [
      {
        "p": "payload"
      }
    ],
    "repeat": "",
    "crontab": "",
    "once": false,
    "onceDelay": "0",
    "topic": "",
    "payload": "100",
    "payloadType": "num",
    "x": 200,
    "y": 2440,
    "wires": [
      [
        "1c984f87c64f2b94"
      ]
    ]
  },
  {
    "id": "b3e2aa120f5562b8",
    "type": "inject",
    "g": "9ce6b60397d80678",
    "name": "Warm Light",
    "props": [
      {
        "p": "payload"
      }
    ],
    "repeat": "",
    "crontab": "",
    "once": false,
    "onceDelay": "0",
    "topic": "",
    "payload": "40",
    "payloadType": "num",
    "x": 190,
    "y": 2580,
    "wires": [
      [
        "823d5a1c4e88859a"
      ]
    ]
  },
  {
    "id": "f0b25aab3f10b2e6",
    "type": "inject",
    "g": "9ce6b60397d80678",
    "name": "Cool Light",
    "props": [
      {
        "p": "payload"
      }
    ],
    "repeat": "",
    "crontab": "",
    "once": false,
    "onceDelay": "0",
    "topic": "",
    "payload": "100",
    "payloadType": "num",
    "x": 180,
    "y": 2620,
    "wires": [
      [
        "823d5a1c4e88859a"
      ]
    ]
  },
  {
    "id": "819835d24807e6f7",
    "type": "inject",
    "g": "9ce6b60397d80678",
    "name": "Brightness 75%",
    "props": [
      {
        "p": "payload"
      }
    ],
    "repeat": "",
    "crontab": "",
    "once": false,
    "onceDelay": "0",
    "topic": "",
    "payload": "75",
    "payloadType": "num",
    "x": 200,
    "y": 2540,
    "wires": [
      [
        "963a73460f2a027a"
      ]
    ]
  },
  {
    "id": "07a04820deb46771",
    "type": "debug",
    "g": "9ce6b60397d80678",
    "name": "2 · Status feedback",
    "active": true,
    "tosidebar": true,
    "console": false,
    "tostatus": false,
    "complete": "true",
    "targetType": "full",
    "statusVal": "",
    "statusType": "auto",
    "x": 1010,
    "y": 2400,
    "wires": []
  },
  {
    "id": "127dc68a2ee5c552",
    "type": "debug",
    "g": "9ce6b60397d80678",
    "name": "4 · Dimming feedback",
    "active": true,
    "tosidebar": true,
    "console": false,
    "tostatus": false,
    "complete": "true",
    "targetType": "full",
    "statusVal": "",
    "statusType": "auto",
    "x": 1020,
    "y": 2480,
    "wires": []
  },
  {
    "id": "62f96ebea61b5f57",
    "type": "debug",
    "g": "9ce6b60397d80678",
    "name": "6 · Temperature feedback",
    "active": true,
    "tosidebar": true,
    "console": false,
    "tostatus": false,
    "complete": "true",
    "targetType": "full",
    "statusVal": "",
    "statusType": "auto",
    "x": 1030,
    "y": 2560,
    "wires": []
  },
  {
    "id": "406982b1b8e78832",
    "type": "debug",
    "g": "9ce6b60397d80678",
    "name": "1 · Switch On/OFF",
    "active": true,
    "tosidebar": true,
    "console": false,
    "tostatus": false,
    "complete": "true",
    "targetType": "full",
    "statusVal": "",
    "statusType": "auto",
    "x": 1010,
    "y": 2360,
    "wires": []
  },
  {
    "id": "0226c961ca721fc1",
    "type": "function",
    "g": "9ce6b60397d80678",
    "name": "Sunrise Effect",
    "func": "// Sunrise: each click raises brightness and colour temperature by one step (10 steps)\nlet step = (context.get('sunriseStep') || 0) % 10 + 1;\ncontext.set('sunriseStep', step);\n\nconst level = step * 10; // 10 ... 100 %\n\nnode.send({ inputTarget: \"Switch On/OFF\", payload: true });\nnode.send({ inputTarget: \"Dimming setpoint\", payload: level });\nnode.send({ inputTarget: \"Temperature setpoint\", payload: level });\n\nnode.status({ fill: \"yellow\", shape: \"dot\", text: \"Step \" + step + \"/10\" });\nreturn null;",
    "outputs": 1,
    "timeout": 0,
    "noerr": 0,
    "initialize": "",
    "finalize": "",
    "libs": [],
    "x": 440,
    "y": 2760,
    "wires": [
      [
        "a10f57ace9530cba"
      ]
    ]
  },
  {
    "id": "2583e073eccc696f",
    "type": "inject",
    "g": "9ce6b60397d80678",
    "name": "Start Sunrise",
    "props": [],
    "repeat": "",
    "crontab": "",
    "once": false,
    "onceDelay": "0",
    "topic": "",
    "x": 260,
    "y": 2760,
    "wires": [
      [
        "0226c961ca721fc1"
      ]
    ]
  },
  {
    "id": "b494dd399d4efd35",
    "type": "comment",
    "g": "9ce6b60397d80678",
    "name": "Communication Tunable White Dimmer",
    "info": "## Tunable White Dimmer node\nDevice: double-click the device node and choose the device of your installation, then Deploy.\n\n### Input targets\n- `Switch On/OFF` — command, true / false\n- `Status feedback` — feedback, true / false\n- `Dimming setpoint` — command, brightness 0-100 %\n- `Dimming feedback` — feedback, brightness\n- `Temperature setpoint` — command, colour temperature in the range of the device object\n- `Temperature feedback` — feedback, colour temperature\n\n### Outputs\n1. Switch On/OFF · 2. Status feedback · 3. Dimming setpoint · 4. Dimming feedback · 5. Temperature setpoint · 6. Temperature 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": 320,
    "y": 2220,
    "wires": []
  },
  {
    "id": "547bb59e22c7cb73",
    "type": "debug",
    "g": "9ce6b60397d80678",
    "name": "3 · Dimming setpoint",
    "active": true,
    "tosidebar": true,
    "console": false,
    "tostatus": false,
    "complete": "false",
    "statusVal": "",
    "statusType": "auto",
    "x": 1020,
    "y": 2440,
    "wires": []
  },
  {
    "id": "91810299a8961eb4",
    "type": "debug",
    "g": "9ce6b60397d80678",
    "name": "5 · Temperature setpoint",
    "active": true,
    "tosidebar": true,
    "console": false,
    "tostatus": false,
    "complete": "false",
    "statusVal": "",
    "statusType": "auto",
    "x": 1030,
    "y": 2520,
    "wires": []
  },
  {
    "id": "a10f57ace9530cba",
    "type": "widget-TunableWhiteDimmer",
    "g": "9ce6b60397d80678",
    "dropdownRoom": "",
    "dropdownCategory": "",
    "dropdownWidget": "",
    "displayName": "Tunable White Dimmer (set device)",
    "x": 720,
    "y": 2460,
    "wires": [
      [
        "406982b1b8e78832"
      ],
      [
        "07a04820deb46771"
      ],
      [
        "547bb59e22c7cb73"
      ],
      [
        "127dc68a2ee5c552"
      ],
      [
        "91810299a8961eb4"
      ],
      [
        "62f96ebea61b5f57"
      ]
    ]
  },
  {
    "id": "fb6c8c33890cc998",
    "type": "inject",
    "g": "9ce6b60397d80678",
    "name": "ON",
    "props": [
      {
        "p": "payload"
      }
    ],
    "repeat": "",
    "crontab": "",
    "once": false,
    "onceDelay": "0",
    "topic": "",
    "payload": "true",
    "payloadType": "bool",
    "x": 230,
    "y": 2280,
    "wires": [
      [
        "2a73b41a2410725e"
      ]
    ]
  },
  {
    "id": "f4328869e9f88eb9",
    "type": "inject",
    "g": "9ce6b60397d80678",
    "name": "OFF",
    "props": [
      {
        "p": "payload"
      }
    ],
    "repeat": "",
    "crontab": "",
    "once": false,
    "onceDelay": "0",
    "topic": "",
    "payload": "false",
    "payloadType": "bool",
    "x": 220,
    "y": 2320,
    "wires": [
      [
        "2a73b41a2410725e"
      ]
    ]
  },
  {
    "id": "2a73b41a2410725e",
    "type": "hypervisu-input-target",
    "g": "9ce6b60397d80678",
    "selectedWidget": "8",
    "selectedInput": "Switch On/OFF",
    "displayName": "Input Target",
    "x": 420,
    "y": 2280,
    "wires": [
      [
        "a10f57ace9530cba"
      ]
    ]
  },
  {
    "id": "3778b91b39108b3c",
    "type": "hypervisu-input-target",
    "g": "9ce6b60397d80678",
    "selectedWidget": "8",
    "selectedInput": "Status feedback",
    "displayName": "Input Target",
    "x": 420,
    "y": 2360,
    "wires": [
      [
        "a10f57ace9530cba"
      ]
    ]
  },
  {
    "id": "41b97b99b3c658a8",
    "type": "inject",
    "g": "9ce6b60397d80678",
    "name": "ON",
    "props": [
      {
        "p": "payload"
      }
    ],
    "repeat": "",
    "crontab": "",
    "once": false,
    "onceDelay": "0",
    "topic": "",
    "payload": "true",
    "payloadType": "bool",
    "x": 220,
    "y": 2360,
    "wires": [
      [
        "3778b91b39108b3c"
      ]
    ]
  },
  {
    "id": "92dbccf8571b3909",
    "type": "inject",
    "g": "9ce6b60397d80678",
    "name": "OFF",
    "props": [
      {
        "p": "payload"
      }
    ],
    "repeat": "",
    "crontab": "",
    "once": false,
    "onceDelay": "0",
    "topic": "",
    "payload": "false",
    "payloadType": "bool",
    "x": 220,
    "y": 2400,
    "wires": [
      [
        "3778b91b39108b3c"
      ]
    ]
  },
  {
    "id": "1c984f87c64f2b94",
    "type": "hypervisu-input-target",
    "g": "9ce6b60397d80678",
    "selectedWidget": "8",
    "selectedInput": "Dimming setpoint",
    "displayName": "Input Target",
    "x": 430,
    "y": 2440,
    "wires": [
      [
        "a10f57ace9530cba"
      ]
    ]
  },
  {
    "id": "963a73460f2a027a",
    "type": "hypervisu-input-target",
    "g": "9ce6b60397d80678",
    "selectedWidget": "8",
    "selectedInput": "Dimming feedback",
    "displayName": "Input Target",
    "x": 430,
    "y": 2500,
    "wires": [
      [
        "a10f57ace9530cba"
      ]
    ]
  },
  {
    "id": "823d5a1c4e88859a",
    "type": "hypervisu-input-target",
    "g": "9ce6b60397d80678",
    "selectedWidget": "8",
    "selectedInput": "Temperature setpoint",
    "displayName": "Input Target",
    "x": 440,
    "y": 2560,
    "wires": [
      [
        "a10f57ace9530cba"
      ]
    ]
  },
  {
    "id": "9af9739812e8265f",
    "type": "hypervisu-input-target",
    "g": "9ce6b60397d80678",
    "selectedWidget": "8",
    "selectedInput": "Temperature feedback",
    "displayName": "Input Target",
    "x": 440,
    "y": 2620,
    "wires": [
      [
        "a10f57ace9530cba"
      ]
    ]
  },
  {
    "id": "0fa9e1e88d42fe19",
    "type": "inject",
    "g": "9ce6b60397d80678",
    "name": "Warm Light",
    "props": [
      {
        "p": "payload"
      }
    ],
    "repeat": "",
    "crontab": "",
    "once": false,
    "onceDelay": "0",
    "topic": "",
    "payload": "40",
    "payloadType": "num",
    "x": 190,
    "y": 2660,
    "wires": [
      [
        "9af9739812e8265f"
      ]
    ]
  },
  {
    "id": "55ca04852c56727f",
    "type": "inject",
    "g": "9ce6b60397d80678",
    "name": "Cool Light",
    "props": [
      {
        "p": "payload"
      }
    ],
    "repeat": "",
    "crontab": "",
    "once": false,
    "onceDelay": "0",
    "topic": "",
    "payload": "100",
    "payloadType": "num",
    "x": 180,
    "y": 2700,
    "wires": [
      [
        "9af9739812e8265f"
      ]
    ]
  }
]