{
  "schema": "devcap1.schema.json",
  "doc:path": "ikea/kadrilj_roller_blind.md",
  "doc:hdr": "KADRILJ roller blind",
  "manufacturername": "$MF_IKEA",
  "modelid": "KADRILJ roller blind",
  "product": "KADRILJ roller blind (E1752-140)",
  "status": "Draft",
  "supportsMgmtBind": true,
  "sleeper": false,
  "subdevices": [
    {
      "type": "$TYPE_WINDOW_COVERING_DEVICE",
      "restapi": "/lights",
      "uuid": [
        "$address.ext",
        "0x01"
      ],
      "items": [
        {
          "name": "attr/manufacturername"
        },
        {
          "name": "attr/modelid"
        },
        {
          "name": "attr/name"
        },
        {
          "name": "attr/swversion"
        },
        {
          "name": "attr/type"
        },
        {
          "name": "attr/uniqueid"
        },
        {
          "name": "attr/lastannounced"
        },
        {
          "name": "attr/lastseen"
        },
        {
          "name": "config/checkin",
          "default": 480
        },
        {
          "name": "state/lift",
          "parse": {
            "cl": "0x0102",
            "at": "0x0008",
            "eval": "Item.val = Attr.val"
          },
          "read": {
            "cl": "0x0102",
            "at": "0x0008"
          },
          "refresh.interval": 700
        },
        {
          "name": "state/open",
          "parse": {
            "cl": "0x0102",
            "at": "0x0008",
            "eval": "Item.val = Attr.val < 100"
          }
        },
        {
          "name": "state/reachable"
        },
        {
          "name": "state/bri",
          "description": "The lift state in earlier versions, use <code class=\"api-attribute\">lift</code> instead.",
          "parse": {
            "cl": "0x0102",
            "at": "0x0008",
            "eval": "Item.val = Attr.val * 254 / 100"
          },
          "read": {
            "fn": "none"
          },
          "deprecated": "2020-04-08"
        },
        {
          "name": "state/on",
          "description": "The open state in earlier versions, use <code class=\"api-attribute\">open</code> instead.",
          "parse": {
            "cl": "0x0102",
            "at": "0x0008",
            "eval": "Item.val = (Attr.val * 254 / 100) > 0"
          },
          "read": {
            "fn": "none"
          },
          "deprecated": "2020-04-08"
        }
      ],
      "example": {
        "etag": "ec590d6e73342fb20fb284111522e48d",
        "lastannounced": "2021-04-12T18:37:56Z",
        "lastseen": "2021-04-12T18:47Z",
        "manufacturername": "IKEA of Sweden",
        "modelid": "KADRILJ roller blind",
        "name": "Window covering device 4",
        "state": {
          "bri": 254,
          "lift": 100,
          "on": true,
          "open": false,
          "reachable": true
        },
        "swversion": "2.2.009",
        "type": "Window covering device",
        "uniqueid": "cc:cc:cc:ff:fe:b3:d9:e6-01"
      }
    },
    {
      "type": "$TYPE_BATTERY_SENSOR",
      "restapi": "/sensors",
      "uuid": [
        "$address.ext",
        "0x01",
        "0x0001"
      ],
      "fingerprint": {
        "profile": "0x0104",
        "device": "0x0402",
        "endpoint": "0x01",
        "in": [
          "0x0001",
          "0x0020",
          "0x0102"
        ]
      },
      "items": [
        {
          "name": "attr/manufacturername"
        },
        {
          "name": "attr/modelid"
        },
        {
          "name": "attr/name"
        },
        {
          "name": "attr/swversion"
        },
        {
          "name": "attr/type"
        },
        {
          "name": "attr/uniqueid"
        },
        {
          "name": "attr/lastseen"
        },
        {
          "name": "config/on"
        },
        {
          "name": "config/reachable"
        },
        {
          "name": "state/battery",
          "parse": {
            "cl": "0x0001",
            "at": "0x0021",
            "eval": "Item.val = Attr.val"
          },
          "read": {
            "cl": "0x0001",
            "at": "0x0021"
          },
          "refresh.interval": 1800
        },
        {
          "name": "state/lastupdated"
        }
      ],
      "example": {
        "config": {
          "on": true,
          "reachable": true
        },
        "lastseen": "2020-12-29T21:55Z",
        "manufacturername": "IKEA of Sweden",
        "modelid": "KADRILJ roller blind",
        "name": "Roller blind 1",
        "state": {
          "battery": 76,
          "lastupdated": "2020-12-29T21:33:36.229"
        },
        "swversion": "2.2.009",
        "type": "ZHABattery",
        "uniqueid": "cc:cc:cc:ff:fe:b3:d9:e6-01-0001"
      }
    }
  ],
  "bindings": [
    {
      "bind": "unicast",
      "src.ep": 1,
      "cl": "0x0001",
      "report": [
        {
          "at": "0x0021",
          "dt": "0x20",
          "min": 300,
          "max": 600,
          "change": "0x01"
        }
      ]
    },
    {
      "bind": "unicast",
      "src.ep": 1,
      "cl": "0x0020"
    },
    {
      "bind": "unicast",
      "src.ep": 1,
      "cl": "0x0102",
      "report": [
        {
          "at": "0x0008",
          "dt": "0x20",
          "min": 1,
          "max": 600,
          "change": "0x01"
        }
      ]
    }
  ]
}
