{
  "schema": "devcap1.schema.json",
  "manufacturername": "_TZE200_aycxwiau",
  "modelid": "TS0601",
  "vendor": "WOOX",
  "product": "Smart Smoke Alarm R7049",
  "sleeper": true,
  "status": "Gold",
  "subdevices": [
    {
      "type": "$TYPE_FIRE_SENSOR",
      "restapi": "/sensors",
      "uuid": [
        "$address.ext",
        "0x01",
        "0xef00"
      ],
      "fingerprint": {
        "profile": "0x0104",
        "device": "0x0051",
        "endpoint": "0x01",
        "in": [
          "0x0000",
          "0xEF00"
        ]
      },
      "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": "zcl:attr", "ep": 1, "cl": "0x0000", "at": "0x0001", "script": "../tuya/tuya_swversion.js"},
          "read": {"fn": "zcl:attr", "ep": 1, "cl": "0x0000", "at": "0x0001"}
        },
        {
          "name": "attr/type"
        },
        {
          "name": "attr/uniqueid"
        },
        {
          "name": "config/on"
        },
        {
          "name": "config/reachable"
        },
        {
          "name": "state/errorcode",
          "awake": true,
          "parse": {
            "dpid": 11,
            "eval": "Item.val = String(Attr.val);",
            "fn": "tuya"
          }
        },
        {
          "name": "state/fire",
          "awake": true,
          "parse": {"dpid": 1, "eval": "Item.val = (Attr.val == 0 ? true : false);","fn": "tuya" },
          "default": false
        },
        {
          "name": "state/lastupdated"
        },
        {
          "name": "state/lowbattery",
          "parse": {"dpid": 14, "eval": "Item.val = (Attr.val == 0 ? true : false);", "fn": "tuya" },
          "default": false
        },
        {
          "name": "state/test",
          "awake": true,
          "parse": {"dpid": 8, "eval": "Item.val = (Attr.val == 0 ? false : true);", "fn": "tuya" },
          "default": false
        }
      ]
    }
  ]
}
