{
  "schema": "devcap1.schema.json",
  "manufacturername": "$MF_LUMI",
  "modelid": "lumi.curtain.acn002",
  "vendor": "Xiaomi",
  "product": "Aqara Roller Shade Driver E1 RSD-M01",
  "sleeper": false,
  "status": "Gold",
  "subdevices": [
    {
      "type": "$TYPE_WINDOW_COVERING_DEVICE",
      "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",
          "awake": true,
          "parse": {
            "fn": "xiaomi:special",
            "mf": "0x115F",
            "at": "0x00F7",
            "idx": "0x0D",
            "eval": "Item.val = '0.0.0_' + ('0000' + (Attr.val & 0xFF).toString()).slice(-4)"
          },
          "read": {
            "fn": "none"
          }
        },
        {
          "name": "attr/type"
        },
        {
          "name": "attr/uniqueid"
        },
        {
          "name": "config/reversed",
          "parse": {
            "fn": "zcl:attr",
            "ep": 1,
            "cl": "0xFCC0",
            "mf": "0x115F",
            "at": "0x0400",
            "eval": "Item.val = Attr.val"
          },
          "read": {
            "fn": "none"
          },
          "write": {
            "fn": "zcl:attr",
            "ep": 1,
            "cl": "0xFCC0",
            "mf": "0x115F",
            "at": "0x0400",
            "dt": "0x10",
            "eval": "Item.val"
          }
        },
        {
          "name": "config/speed",
          "parse": {
            "fn": "zcl:attr",
            "ep": 1,
            "cl": "0xFCC0",
            "mf": "0x115F",
            "at": "0x0408",
            "eval": "Item.val = Attr.val"
          },
          "read": {
            "fn": "none"
          },
          "write": {
            "fn": "zcl:attr",
            "ep": 1,
            "cl": "0xFCC0",
            "mf": "0x115F",
            "at": "0x0408",
            "dt": "0x20",
            "eval": "Item.val"
          }
        },
        {
          "name": "state/alert"
        },
        {
          "name": "state/lift",
          "parse": {
            "fn": "zcl:attr",
            "ep": 1,
            "cl": "0x000D",
            "at": "0x0055",
            "eval": "Item.val = 100 - Attr.val"
          },
          "read": {
            "fn": "zcl:attr",
            "ep": 1,
            "cl": "0x000D",
            "at": "0x0055"
          },
          "refresh.interval": 360
        },
        {
          "name": "state/open",
          "parse": {
            "fn": "zcl:attr",
            "ep": 1,
            "cl": "0x000D",
            "at": "0x0055",
            "eval": "Item.val = Attr.val > 0"
          },
          "read": {
            "fn": "none"
          }
        },
        {
          "name": "state/reachable"
        },
        {
          "name": "state/speed",
          "deprecated": "2023-04-14",
          "description": "Deprecated in favour of config/speed.",
          "parse": {
            "fn": "zcl:attr",
            "cl": "0xFCC0",
            "at": "0x0408",
            "ep": 1,
            "mf": "0x115F",
            "eval": "Item.val = Attr.val"
          },
          "read": {
            "fn": "none"
          }
        }
      ]
    },
    {
      "type": "$TYPE_BATTERY_SENSOR",
      "restapi": "/sensors",
      "uuid": [
        "$address.ext",
        "0x01",
        "0xfcc0"
      ],
      "fingerprint": {
        "profile": "0x0104",
        "device": "0x0100",
        "endpoint": "0x01",
        "in": [
          "0x0000",
          "0x000A",
          "0x000D",
          "0x0013",
          "0xFCC0"
        ],
        "out": [
          "0x0019"
        ]
      },
      "items": [
        {
          "name": "attr/id"
        },
        {
          "name": "attr/lastannounced"
        },
        {
          "name": "attr/lastseen"
        },
        {
          "name": "attr/manufacturername"
        },
        {
          "name": "attr/modelid"
        },
        {
          "name": "attr/name"
        },
        {
          "name": "attr/swversion",
          "awake": true,
          "parse": {
            "fn": "xiaomi:special",
            "mf": "0x115F",
            "at": "0x00F7",
            "idx": "0x0D",
            "eval": "Item.val = '0.0.0_' + ('0000' + (Attr.val & 0xFF).toString()).slice(-4)"
          },
          "read": {
            "fn": "none"
          }
        },
        {
          "name": "attr/type"
        },
        {
          "name": "attr/uniqueid"
        },
        {
          "name": "config/on"
        },
        {
          "name": "config/reachable"
        },
        {
          "name": "config/temperature",
          "awake": true,
          "parse": {
            "fn": "xiaomi:special",
            "ep": 1,
            "at": "0x00f7",
            "idx": "0x03",
            "eval": "Item.val = Attr.val * 100"
          },
          "read": {
            "fn": "none"
          }
        },
        {
          "name": "state/battery",
          "parse": {
            "fn": "zcl:attr",
            "ep": 1,
            "cl": "0xFCC0",
            "mf": "0x115F",
            "at": "0x040A",
            "eval": "Item.val = Attr.val"
          },
          "read": {
            "fn": "zcl:attr",
            "ep": 1,
            "cl": "0xFCC0",
            "mf": "0x115F",
            "at": [
              "0x0400",
              "0x0408",
              "0x0409",
              "0x040A"
            ]
          },
          "refresh.interval": 360
        },
        {
          "name": "state/charging",
          "parse": {
            "fn": "zcl:attr",
            "ep": 1,
            "cl": "0xFCC0",
            "mf": "0x115F",
            "at": "0x0409",
            "eval": "Item.val = Attr.val === 1"
          },
          "read": {
            "fn": "none"
          }
        },
        {
          "name": "state/lastupdated"
        }
      ]
    }
  ]
}
