The device is expecting a MultilevelSensor Report Z-Wave Command
If there is any way to send the sensor’s temperature from the SmartApp to the thermostat, I am willing to know it.
The design may still be changed if need be.
in short, no, you can’t send Z-Wave command from your smartapp. Z-Wave commands can only be sent out by device-types only.
However, here’s what you can do to solve your problem, and it’s mostly answered by @obycode :
-
in your thermostat device type, create a command http://docs.smartthings.com/en/latest/device-type-developers-guide/definition-metadata.html#commands setTemperature
-
put in your zwave commands there
zwave.sensorMultilevelV3.sensorMultilevelReport(sensorType: 1, scale: deviceScale, precision: p, scaledValue: convertedDegrees).format()
-
in your smartapp, make sure you can set preference to select your outdoor sensor and your thermostat
input “outTemp”, “capability.temperatureMeasurement”, title: "Select an outdoor sensor"
input “therm”, “device.deviceTypeName”, title: “Select thermostat” -
make sure you subscribe to the outTemp
def install() { subscribe(outTemp, “temperature”, tempHandler) }
-
in the smartapp event handler for your outdoor temperature, send your outdoor temperature to the thermostat device type using the command you’ve extended in step 1
def tempHandler(evt) {
therm.setTemperature(evt.value)
}