{
  "schema": "devcap1.schema.json",
  "manufacturername": "Stelpro",
  "modelid": "SMT402AD",
  "product": "SMT402AD Thermostat",
  "sleeper": false,
  "status": "Gold",
  "subdevices": [
    {
      "type": "$TYPE_THERMOSTAT",
      "restapi": "/sensors",
      "uuid": [
        "$address.ext",
        "0x19",
        "0x0201"
      ],
      "fingerprint": {
        "profile": "0x0104",
        "device": "0x0301",
        "endpoint": "0x19",
        "in": [
          "0x0001",
          "0x0003",
          "0x0004",
          "0x0006",
          "0x0201",
          "0x0204"
        ]
      },
      "items": [
        {
          "name": "attr/id"
        },
        {
          "name": "attr/lastannounced"
        },
        {
          "name": "attr/lastseen"
        },
        {
          "name": "attr/manufacturername"
        },
        {
          "name": "attr/modelid"
        },
        {
          "name": "attr/name"
        },
        {
          "name": "attr/swversion",
          "read": {
            "at": "0x0001",
            "cl": "0x0000",
            "ep": 0,
            "fn": "zcl:attr"
          },
          "parse": {
            "at": "0x0001",
            "cl": "0x0000",
            "ep": 255,
            "eval": "Item.val = Attr.val",
            "fn": "zcl:attr"
          }
        },
        {
          "name": "attr/type"
        },
        {
          "name": "attr/uniqueid"
        },
        {
          "name": "config/externalsensortemp",
          "description": "External sensor temperature used as Outdoor temperature on display.",
          "refresh.interval": 300,
          "read": {
            "at": "0x4001",
            "cl": "0x0201",
            "ep": 25,
            "fn": "zcl:attr",
            "mf": "0x1185"
          },
          "write": {
            "at": "0x4001",
            "cl": "0x0201",
            "dt": "0x29",
            "ep": 25,
            "eval": "Item.val",
            "fn": "zcl:attr",
            "mf": "0x1185"
          },
          "parse": {
            "at": "0x4001",
            "cl": "0x0201",
            "ep": 25,
            "eval": "Item.val = Attr.val;",
            "fn": "zcl:attr",
            "mf": "0x1185"
          },
          "default": 0
        },
        {
          "name": "config/heatsetpoint",
          "default": 0
        },
        {
          "name": "config/mode"
        },
        {
          "name": "config/offset",
          "default": 0
        },
        {
          "name": "config/on"
        },
        {
          "name": "config/reachable"
        },
        {
          "name": "config/unoccupiedheatsetpoint",
          "refresh.interval": 300,
          "read": {
            "at": "0x0014",
            "cl": "0x0201",
            "ep": 25,
            "fn": "zcl:attr"
          },
          "write": {
            "at": "0x0014",
            "cl": "0x0201",
            "dt": "0x29",
            "ep": 25,
            "eval": "Item.val",
            "fn": "zcl:attr",
            "mf": "0x1185"
          },
          "parse": {
            "at": "0x0014",
            "cl": "0x0201",
            "ep": 25,
            "eval": "Item.val = Attr.val;",
            "fn": "zcl:attr"
          },
          "default": 17
        },
        {
          "name": "state/lastupdated"
        },
        {
          "name": "state/on",
          "refresh.interval": 5
        },
        {
          "name": "state/temperature",
          "parse": {
            "at": "0x0000",
            "cl": "0x0201",
            "ep": 25,
            "eval": "Item.val = Attr.val + R.item('config/offset').val",
            "fn": "zcl:attr"
          },
          "default": 0
        },
        {
          "name": "state/valve",
          "description": "PI Heating Demand. If below 10, then device is Idle, else device is Heating.",
          "refresh.interval": 300,
          "read": {
            "at": "0x0008",
            "cl": "0x0201",
            "ep": 25,
            "fn": "zcl:attr"
          },
          "parse": {
            "at": "0x0008",
            "cl": "0x0201",
            "ep": 25,
            "eval": "Item.val = Attr.val;",
            "fn": "zcl:attr"
          },
          "default": 0
        }
      ]
    },
    {
      "type": "$TYPE_HUMIDITY_SENSOR",
      "restapi": "/sensors",
      "uuid": [
        "$address.ext",
        "0x19",
        "0x0405"
      ],
       "fingerprint": {
        "profile": "0x0104",
        "device": "0x0301",
        "endpoint": "0x19",
        "in": [
          "0x0001",
          "0x0003",
          "0x0004",
          "0x0006",
          "0x0405"
        ]
      },
      "items": [
        {
          "name": "attr/id"
        },
        {
          "name": "attr/lastannounced"
        },
        {
          "name": "attr/lastseen"
        },
        {
          "name": "attr/manufacturername"
        },
        {
          "name": "attr/modelid"
        },
        {
          "name": "attr/name"
        },
        {
          "name": "attr/swversion",
          "read": {
            "at": "0x0001",
            "cl": "0x0000",
            "ep": 0,
            "fn": "zcl:attr"
          },
          "parse": {
            "at": "0x0001",
            "cl": "0x0000",
            "ep": 255,
            "eval": "Item.val = Attr.val",
            "fn": "zcl:attr"
          }
        },
        {
          "name": "attr/type"
        },
        {
          "name": "attr/uniqueid"
        },
        {
          "name": "config/offset",
          "default": 0
        },
        {
          "name": "config/on"
        },
        {
          "name": "config/reachable"
        },
        {
          "name": "state/humidity",
          "refresh.interval": 300,
          "read": {
            "at": "0x0000",
            "cl": "0x0405",
            "ep": 25,
            "fn": "zcl:attr"
          },
          "parse": {
            "at": "0x0000",
            "cl": "0x0405",
            "ep": 25,
            "eval": "Item.val = Attr.val + R.item('config/offset').val",
            "fn": "zcl:attr"
          },
          "default": 0
        },
        {
          "name": "state/lastupdated"
        }
      ]
    }
  ],
  "bindings": [
    {
      "bind": "unicast",
      "src.ep": 25,
      "cl": "0x0405"
    },
    {
      "bind": "unicast",
      "src.ep": 25,
      "cl": "0x0204"
    },
    {
      "bind": "unicast",
      "src.ep": 25,
      "cl": "0x0201"
    }
  ]
}
