{
  "schema": "devcap1.schema.json",
  "manufacturername": "$MF_LUMI",
  "modelid": "lumi.sensor_magnet.aq2",
  "vendor": "Xiaomi",
  "product": "Aqara open/close sensor MCCGQ11LM",
  "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": "0x5F01",
        "endpoint": "0x01",
        "in": [
          "0x0006"
        ]
      },
      "items": [
        {
          "name": "attr/id"
        },
        {
          "name": "attr/lastannounced"
        },
        {
          "name": "attr/lastseen"
        },
        {
          "name": "attr/manufacturername"
        },
        {
          "name": "attr/modelid",
          "awake": true
        },
        {
          "name": "attr/name"
        },
        {
          "name": "attr/swversion",
          "parse": {
            "fn": "zcl:attr",
            "ep": "0x01",
            "cl": "0x0000",
            "at": "0x0001",
            "eval": "Item.val = '0.0.0_' + ('0000' + Attr.val.toString()).slice(-4)"
          },
          "read": {
            "fn": "zcl:attr",
            "ep": "0x01",
            "cl": "0x0000",
            "at": "0x0001"
          },
          "refresh.interval": 86400
        },
        {
          "name": "attr/type"
        },
        {
          "name": "attr/uniqueid"
        },
        {
          "name": "config/battery",
          "awake": true,
          "parse": {
            "fn": "xiaomi:special",
            "at": "0xFF01",
            "idx": "0x01",
            "script": "xiaomi_battery.js"
          }
        },
        {
          "name": "config/on"
        },
        {
          "name": "config/reachable"
        },
        {
          "name": "config/temperature",
          "awake": true,
          "parse": {
            "fn": "xiaomi:special",
            "at": "0xFF01",
            "idx": "0x03",
            "eval": "Item.val = Attr.val * 100"
          }
        },
        {
          "name": "state/lastupdated"
        },
        {
          "name": "state/open",
          "parse": {
            "fn": "zcl:attr",
            "ep": 1,
            "cl": "0x0006",
            "at": "0x0000",
            "eval": "Item.val = Attr.val"
          }
        },
        {
          "name": "state/open_bis",
          "awake": true,
          "parse": {
            "fn": "xiaomi:special",
            "at": "0xFF01",
            "idx": "0x64",
            "eval": "R.item('state/open').val = Attr.val"
          }
        }
      ]
    }
  ]
}
