{
   "schema":"devcap1.schema.json",
   "manufacturername": ["_TYZB01_tv3wxhcz","_TYZB01_hqbdru35","TZ3000_tiwq83wk","_TZ3000_ykwcwxmz","_TZ3000_hgu1dlak","_TZ3000_hktqahrq","_TZ3000_kmh5qpmb",
                        "_TZ3000_jmrgyl7o","_TZ3000_msl6wxk9", "_TZ3000_otvn3lne", "_TZ3000_6ygjfyll", "_TZ3040_6ygjfyll", "_TZ3000_mcxw5ehu","_TYZB01_ef5xlc9q",
                        "_TYZB01_vwqnz1sn","_TYZB01_2b8f6cio","_TZE200_bq5c8xfe","_TYZB01_dl7cejts","_TYZB01_qjqgmqxr","_TZ3000_mmtwjmaq","_TYZB01_zwvaj5wy",
                        "_TZ3000_bsvqrxru", "_TZ3000_mg4dy6z6", "_TZ3040_bb6xaihh", "_TZ3000_lf56vpxj"],
   "modelid":["TS0202", "TS0202", "TS0202", "TS0202", "TS0202","TS0202", "TS0202", "TS0202", "TS0202", "TS0202","TS0202", "TS0202", "TS0202", "TS0202",
             "TS0202", "TS0202", "TS0202", "TS0202", "TS0202","TS0202", "TS0202", "TS0202", "TS0202", "TS0202", "TS0202"],
   "product":"TS0202 Presence sensor",
   "sleeper":true,
   "status":"Gold",
   "subdevices":[
      {
         "type":"$TYPE_PRESENCE_SENSOR",
         "restapi":"/sensors",
         "uuid":[
            "$address.ext",
            "0x01",
            "0x0500"
         ],
         "fingerprint": {
           "profile": "0x0104",
           "device": "0x0402",
           "endpoint": "0x01",
           "in": [
             "0x0000",
             "0x0001",
             "0x0500"
           ]
         },
         "items":[
            {
               "name":"attr/id"
            },
            {
               "name":"attr/lastannounced"
            },
            {
               "name":"attr/lastseen"
            },
            {
               "name":"attr/manufacturername"
            },
            {
               "name":"attr/modelid"
            },
            {
               "name":"attr/name"
            },
            {
              "name": "attr/swversion",                   
              "parse": {"fn": "zcl:attr", "ep": 1, "cl": "0x0000", "at": "0x0001", "script": "tuya_swversion.js"},
              "read": {"fn": "zcl:attr", "ep": 1, "cl": "0x0000", "at": "0x0001"}
            },
            {
               "name":"attr/type"
            },
            {
               "name":"attr/uniqueid"
            },
            {
               "name":"config/battery",
               "default":0
            },
            {
               "name":"config/duration"
            },
            {
               "name":"config/enrolled",
               "public":false
            },
            {
               "name":"config/on"
            },
            {
               "name":"config/pending"
            },
            {
               "name":"config/reachable"
            },
            {
               "name":"state/lastupdated"
            },
            {
               "name":"state/lowbattery"
            },
            {
               "name":"state/presence",
               "awake":true,
               "parse":{
                  "fn":"ias:zonestatus",
                  "mask":"alarm1"
               }
            }
         ]
      }
   ],
   "bindings":[
      {
         "bind":"unicast",
         "src.ep":1,
         "cl":"0x0500"
      },
      {
         "bind":"unicast",
         "src.ep":1,
         "cl":"0x0001",
         "report":[
            {
               "at":"0x0021",
               "dt":"0x20",
               "min":3600,
               "max":14400,
               "change":"0x00000001"
            }
         ]
      }
   ]
}
