{
  "schema": "devcap1.schema.json",
  "manufacturername": "$MF_LUMI",
  "modelid": "lumi.motion.agl04",
  "vendor": "Xiaomi",
  "product": "Aqara high precision motion sensor RTCGQ13LM",
  "sleeper": true,
  "status": "Gold",
  "subdevices": [
    {
      "type": "$TYPE_PRESENCE_SENSOR",
      "restapi": "/sensors",
      "uuid": [
        "$address.ext",
        "0x01",
        "0x0406"
      ],
      "fingerprint": {
        "profile": "0x0104",
        "device": "0x0107",
        "endpoint": "0x01",
        "in": [
          "0x0000",
          "0x0001",
          "0x0406",
          "0xFCC0"
        ]
      },
      "items": [
        {
          "name": "attr/id"
        },
        {
          "name": "attr/lastannounced"
        },
        {
          "name": "attr/lastseen"
        },
        {
          "name": "attr/manufacturername"
        },
        {
          "name": "attr/modelid",
          "awake": true
        },
        {
          "name": "attr/name"
        },
        {
          "name": "attr/swversion",
          "awake": true,
          "parse": {
            "at": "0x00f7",
            "ep": 1,
            "fn": "xiaomi:special",
            "idx": "0x08",
            "script": "xiaomi_swversion.js"
          },
          "read": {
            "fn": "none"
          }
        },
        {
          "name": "attr/type"
        },
        {
          "name": "attr/uniqueid"
        },
        {
          "name": "config/battery",
          "awake": true,
          "parse": {
            "at": "0xff07",
            "ep": 1,
            "fn": "xiaomi:special",
            "idx": "0x01",
            "script": "xiaomi_battery.js"
          }
        },
        {
          "name": "config/duration",
          "refresh.interval": 3600,
          "awake": true,
          "parse": {
            "at": "0x0102",
            "cl": "0xFCC0",
            "ep": 1,
            "eval": "Item.val = Attr.val",
            "fn": "zcl:attr",
            "mf": "0x115F"
          },
          "read": {
            "at": "0x0102",
            "cl": "0xFCC0",
            "ep": 1,
            "fn": "zcl:attr",
            "mf": "0x115F"
          },
          "write": {
            "at": "0x0102",
            "change.timeout": 3600,
            "cl": "0xFCC0",
            "dt": "0x20",
            "ep": 1,
            "eval": "Item.val",
            "fn": "zcl:attr",
            "mf": "0x115F",
            "state.timeout": 2
          },
          "range": [1, 65535],
          "default": 30
        },
        {
          "name": "config/on"
        },
        {
          "name": "config/reachable"
        },
        {
          "name": "config/sensitivity",
          "refresh.interval": 3600,
          "awake": true,
          "parse": {
            "at": "0x010C",
            "cl": "0xFCC0",
            "ep": 1,
            "eval": "Item.val = Attr.val",
            "fn": "zcl:attr",
            "mf": "0x115F"
          },
          "read": {
            "at": "0x010C",
            "cl": "0xFCC0",
            "ep": 1,
            "fn": "zcl:attr",
            "mf": "0x115F"
          },
          "write": {
            "at": "0x010C",
            "change.timeout": 3600,
            "cl": "0xFCC0",
            "dt": "0x20",
            "ep": 1,
            "eval": "Item.val",
            "fn": "zcl:attr",
            "mf": "0x115F",
            "state.timeout": 2
          },
          "values": [
            [1, "Low"],
            [2, "Medium"],
            [3, "High"]
          ],
          "default": 3
        },
        {
          "name": "state/lastupdated"
        },
        {
          "name": "state/presence",
          "parse": {
            "at": "0x0000",
            "cl": "0x0406",
            "ep": 1,
            "eval": "Item.val = Attr.val"
          },
          "read": {
            "fn": "none"
          }
        }
      ]
    }
  ]
}