{
  "schema": "devcap1.schema.json",
  "manufacturername": "$MF_LUMI",
  "modelid": "lumi.vibration.aq1",
  "vendor": "Xiaomi",
  "product": "Aqara Vibration Sensor DJT11LM",
  "sleeper": true,
  "status": "Gold",
  "subdevices": [
    {
      "type": "$TYPE_VIBRATION_SENSOR",
      "restapi": "/sensors",
      "uuid": [
        "$address.ext",
        "0x01",
        "0x0101"
      ],
      "fingerprint": {
        "profile": "0x0104",
        "device": "0x000A",
        "endpoint": "0x01",
        "in": [
          "0x0101"
        ]
      },
      "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": {
            "fn": "xiaomi:special",
            "mf": "0x115F",
            "at": "0xFF01",
            "idx": "0x08",
            "eval": "Item.val = '0.0.0_' + ('0000' + (Attr.val & 0xFF).toString()).slice(-4)"
          },
          "read": {
            "fn": "none"
          }
        },
        {
          "name": "attr/type"
        },
        {
          "name": "attr/uniqueid"
        },
        {
          "name": "config/battery",
          "awake": true,
          "parse": {
            "fn": "xiaomi:special",
            "mf": "0x115F",
            "at": "0xFF01",
            "idx": "0x01",
            "script": "xiaomi_battery.js"
          }
        },
        {
          "name": "config/duration",
          "static": 65
        },
        {
          "name": "config/on"
        },
        {
          "name": "config/reachable"
        },
        {
          "name": "config/sensitivity",
          "parse": {
            "fn": "zcl:attr",
            "ep": 1,
            "cl": "0x0000",
            "mf": "0x115F",
            "at": "0xFF0D",
            "eval": "Item.val = 3 - Attr.val"
          },
          "read": {
            "fn": "zcl:attr",
            "ep": 1,
            "cl": "0x0000",
            "mf": "0x115F",
            "at": "0xFF0D"
          },
          "refresh.interval": 3600,
          "write": {
            "fn": "zcl:attr",
            "ep": 1,
            "cl": "0x0000",
            "mf": "0x115F",
            "at": "0xFF0D",
            "dt": "0x20",
            "eval": "3 - Item.val",
            "state.timeout": 2,
            "change.timeout": 3600
            },
          "values": [
            [
              0,
              "Low"
            ],
            [
              1,
              "Medium"
            ],
            [
              2,
              "High"
            ]
          ],
          "default": 2
        },
        {
          "name": "config/sensitivitymax",
          "static": 2
        },
        {
          "name": "config/temperature",
          "awake": true,
          "parse": {
            "fn": "xiaomi:special",
            "mf": "0x115F",
            "at": "0xFF01",
            "idx": "0x03",
            "eval": "Item.val = Attr.val * 100"
          }
        },
        {
          "name": "state/lastupdated"
        },
        {
          "name": "state/orientation_x",
          "parse": {
            "fn": "zcl:attr",
            "ep": "0x01",
            "cl": "0x0101",
            "at": "0x0508",
            "script": "0101_orientation.js"
          }
        },
        {
          "name": "state/orientation_y"
        },
        {
          "name": "state/orientation_z"
        },
        {
          "name": "state/tiltangle",
          "parse": {
            "fn": "zcl:attr",
            "ep": "0x01",
            "cl": "0x0101",
            "at": "0x0503",
            "eval": "Item.val = Attr.val"
          }
        },
        {
          "name": "state/vibration",
          "parse": {
            "fn": "zcl:attr",
            "ep": "0x01",
            "cl": "0x0101",
            "at": "0x0055",
            "eval": "if (Attr.val === 0x0001) { Item.val = true } else if (Attr.val === 0x0003) { R.item('state/tiltangle').val = 360 }"
          }
        },
        {
          "name": "state/vibrationstrength",
          "parse": {
            "fn": "zcl:attr",
            "ep": "0x01",
            "cl": "0x0101",
            "at": "0x0505",
            "eval": "Item.val = Attr.val >> 16"
          }
        }
      ]
    }
  ]
}
