{
  "schema": "devcap1.schema.json",
  "manufacturername": "_TZE200_myd45weu",
  "modelid": "TS0601",
  "product": "Tuya Soil Sensor",
  "sleeper": true,
  "status": "Gold",
  "subdevices": [
    {
      "type": "$TYPE_TEMPERATURE_SENSOR",
      "restapi": "/sensors",
      "uuid": [
        "$address.ext",
        "0x01",
        "0x0402"
      ],
      "items": [
        {
          "name": "attr/id"
        },
        {
          "name": "attr/lastannounced"
        },
        {
          "name": "attr/lastseen"
        },
        {
          "name": "attr/manufacturername"
        },
        {
          "name": "attr/modelid"
        },
        {
          "name": "attr/name"
        },
        {
          "name": "config/tuya_unlock"
        },
        {
          "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",
          "read": {
            "fn": "none"
          },
          "parse": {
            "dpid": 15,
            "eval": "Item.val = Attr.val;",
            "fn": "tuya"
          },
          "default": 0
        },
        {
          "name": "state/lowbattery",
          "read": {
            "fn": "none"
          },
          "parse": {
            "dpid": 14,
            "eval": "Item.val = (Attr.val == 0 ? true : false);",
            "fn": "tuya"
          },
          "default": false
        },
        {
          "name": "config/offset"
        },
        {
          "name": "config/on"
        },
        {
          "name": "config/reachable"
        },
        {
          "name": "state/lastupdated"
        },
        {
          "name": "state/temperature",
          "read": {
            "fn": "none"
          },
          "parse": {
            "dpid": 5,
            "eval": "Item.val = Attr.val * 100;",
            "fn": "tuya"
          },
          "default": 0,
          "awake": true
        }
      ]
    },
    {
      "type": "$TYPE_MOISTURE_SENSOR",
      "restapi": "/sensors",
      "uuid": [
        "$address.ext",
        "0x01",
        "0x0408"
      ],
      "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",
          "read": {
            "fn": "none"
          },
          "parse": {
            "dpid": 15,
            "eval": "Item.val = Attr.val;",
            "fn": "tuya"
          },
          "default": 0
        },
        {
          "name": "state/lowbattery",
          "read": {
            "fn": "none"
          },
          "parse": {
            "dpid": 14,
            "eval": "Item.val = (Attr.val == 0 ? true : false);",
            "fn": "tuya"
          },
          "default": false
        },
        {
          "name": "config/offset"
        },
        {
          "name": "config/on"
        },
        {
          "name": "config/reachable"
        },
        {
          "name": "state/moisture",
          "read": {
            "fn": "none"
          },
          "parse": {
            "dpid": 3,
            "eval": "Item.val = Attr.val * 100;",
            "fn": "tuya"
          },
          "default": 0,
          "awake": true
        },
        {
          "name": "state/lastupdated"
        }
      ]
    }
  ]
}
