{
  "schema": "devcap1.schema.json",
  "manufacturername": "$MF_LUMI",
  "modelid": "lumi.sensor_magnet",
  "vendor": "Xiaomi",
  "product": "Mijia open/close sensor MCCGQ01LM",
  "sleeper": true,
  "status": "Gold",
  "md:known_issues": [ "xiaomi_known_issues1.md", "xiaomi_known_issues_mccqg01lm.md" ],
  "subdevices": [
    {
      "type": "$TYPE_OPEN_CLOSE_SENSOR",
      "restapi": "/sensors",
      "uuid": [
        "$address.ext",
        "0x01",
        "0x0006"
      ],
      "fingerprint": {
        "profile": "0x0104",
        "device": "0xFFFF",
        "endpoint": "0x01",
        "in": [
          "0x0006"
        ]
      },
      "items": [
        {
          "name": "attr/id"
        },
        {
          "name": "attr/lastannounced"
        },
        {
          "name": "attr/lastseen"
        },
        {
          "name": "attr/manufacturername"
        },
        {
          "name": "attr/modelid"
        },
        {
          "name": "attr/name"
        },
        {
            "name": "attr/swversion",
            "read": {"cl": "0x0000", "at": "0x0006"},
            "parse": {"cl": "0x0000", "at": "0x0006", "eval": "Item.val = Attr.val"}
        },
        {
          "name": "attr/type"
        },
        {
          "name": "attr/uniqueid"
        },
        {
          "name": "config/battery",
          "parse": {"fn": "xiaomi:special", "ep": 1, "at": "0xff02", "idx": "0x01", "script": "xiaomi_battery.js"}
        },
        {
          "name": "config/on"
        },
        {
          "name": "config/reachable"
        },
        {
          "name": "state/lastupdated"
        },
        {
          "name": "state/open",
          "parse": {"fn": "zcl:attr", "ep": 1, "cl": "0x0006", "at": "0x0000", "eval": "Item.val = Attr.val != 0"}
        }
      ]
    }
  ]
}