{
  "schema": "devcap1.schema.json",
  "manufacturername": ["MLI"],
  "modelid": ["ZBT-ExtendedColor"],
  "product": "Tint by Mueller Light GU10 spot",
  "sleeper": false,
  "status": "Gold",
  "subdevices": [
    {
      "type": "$TYPE_EXTENDED_COLOR_LIGHT",
      "restapi": "/lights",
      "uuid": [
        "$address.ext",
        "0x01"
      ],
      "items": [
        {
          "name": "attr/id"
        },
        {
          "name": "attr/lastannounced"
        },
        {
          "name": "attr/lastseen"
        },
        {
          "name": "attr/manufacturername"
        },
        {
          "name": "attr/modelid"
        },
        {
          "name": "attr/name"
        },
        {
          "name": "attr/swversion"
        },
        {
          "name": "attr/type"
        },
        {
          "name": "attr/uniqueid"
        },
        {
          "name": "cap/bri/move_with_onoff"
        },
        {
          "name": "cap/color/capabilities"
        },
        {
          "name": "cap/color/ct/computes_xy"
        },
        {
          "name": "cap/color/ct/max"
        },
        {
          "name": "cap/color/ct/min"
        },
        {
          "name": "cap/color/xy/blue_x",
          "static": 8369
        },
        {
          "name": "cap/color/xy/blue_y",
          "static": 8369
        },
        {
          "name": "cap/color/xy/green_x",
          "static": 7287
        },
        {
          "name": "cap/color/xy/green_y",
          "static": 50573
        },
        {
          "name": "cap/color/xy/red_x",
          "static": 34373
        },
        {
          "name": "cap/color/xy/red_y",
          "static": 15315
        },
        {
          "name": "cap/on/off_with_effect"
        },
        {
          "name": "config/bri/on_level"
        },
        {
          "name": "config/bri/startup"
        },
        {
          "name": "config/color/ct/startup"
        },
        {
          "name": "config/color/execute_if_off"
        },
        {
          "name": "config/on/startup"
        },
        {
         "name": "state/alert"
        },
        {
          "name": "state/on",
          "refresh.interval": 365
        },
        {
          "name": "state/bri",
          "refresh.interval": 365
        },
        {
          "name": "state/colormode",
          "values": [
            ["\"ct\"", "color temperature"],
            ["\"effect\"", "dynamic effect"],
        		["\"hs\"", "hue and saturation"],
        		["\"xy\"", "CIE xy color space coordinates"]
        	],
          "parse": {
            "fn": "zcl:attr", "ep": "0x01", "cl": "0x0300", "at": "0x4001",
            "eval": "if (Item.val !== 'effect') Item.val = ['hs', 'xy', 'ct', 'xy'][Attr.val]"
          },
          "read": {
            "fn": "zcl:attr", "ep": "0x01", "cl": "0x0300", "at": ["0x4001", "0x0007", "0x0003", "0x0004", "0x4002", "0x0000", "0x0001"]
          },
          "refresh.interval": 365
        },
        {
          "name": "state/ct",
          "read": { "fn": "none" }
        },
        {
          "name": "state/x",
          "read": { "fn": "none" }
        },
        {
          "name": "state/y",
          "read": { "fn": "none" }
        },
        {
          "name": "state/effect",
          "values": [
            ["\"none\"", "no effect is active"],
            ["\"colorloop\"", "colorloop through hue values"],
            ["\"sunset\"", "sunset special scene"],
            ["\"party\"", "party special scene"],
            ["\"worklight", "worklight special scene"],
            ["\"campfire", "campfire special scene"],
            ["\"romance", "romance special scene"],
            ["\"nightlight", "nightlight special scene"]
          ],
          "parse": {
            "fn": "zcl:attr", "ep": "0x01", "cl": "0x0300", "at": "0x4002",
            "eval": "if (Item.val === 'none' || Item.val === 'colorloop') Item.val = Attr.val ? 'colorloop' : 'none'"
          },
          "read": { "fn": "none" }
        },
        {
          "name": "state/hue",
          "parse": {
            "fn": "zcl:attr", "ep": "0x01", "cl": "0x0300", "at": "0x0000",
            "eval": "Item.val = Attr.val"
          },
          "read": { "fn": "none" }
        },
        {
          "name": "state/sat",
          "read": { "fn": "none" }
        },
        {
          "name": "state/reachable"
        }
      ]
    }
  ],
  "bindings": [
    {
      "bind": "unicast",
      "src.ep": 1,
      "cl": "0x0006",
      "report": [
        { "at": "0x0000", "dt": "0x10", "min": 1, "max": 300 }
      ]
    },
    {
      "bind": "unicast",
      "src.ep": 1,
      "cl": "0x0008",
      "report": [
        { "at": "0x0000", "dt": "0x20", "min": 1, "max": 300, "change": 1 }
      ]
    },
    {
      "bind": "unicast",
      "src.ep": 1,
      "cl": "0x0300",
      "report": [
        { "at": "0x0000", "dt": "0x20", "min": 1, "max": 300, "change": 1 },
        { "at": "0x0001", "dt": "0x20", "min": 1, "max": 300, "change": 1 },
        { "at": "0x0003", "dt": "0x21", "min": 1, "max": 300, "change": 1 },
        { "at": "0x0004", "dt": "0x21", "min": 1, "max": 300, "change": 1 },
        { "at": "0x0007", "dt": "0x21", "min": 1, "max": 300, "change": 1 },
        { "at": "0x4001", "dt": "0x30", "min": 1, "max": 300 },
        { "at": "0x4002", "dt": "0x20", "min": 1, "max": 300, "change": 1 }
      ]
    },
    {
      "bind": "unicast",
      "src.ep": 1,
      "cl": "0x0000",
      "report": [
        { "mf": "0x121b", "at": "0x4005", "dt": "0x20", "min": 1, "max": 300, "change": 1 }
      ]
    }
  ]
}
