Modified Virtual Thermostat to use Setpoint from thermostat?

Hey all, first post to the forums. I have a setup in my room that I think others may have tried as well. I have heat controlled through a Z wave thermostat (Stelpro KI STZW402WB+) on the wall, and a window air conditioner to handle cooling. In the fall and spring seasons, the temperature in the north east varies enough that I end up running both. My AC is currently connected to a z wave outlet, and is cycled according to the temperature reading that my Z wave thermostat provides, and the setpoint I enter in to the Virtual Thermostat SmartApp.

My question is: How could I modify the Virtual Thermostat SmartApp to use the setpoint from the Z wave thermostat rather than have to enter in my setpoint manually from the Virtual Thermostat SmartApp config? I tried tweaking the code to use capability.thermostatSetpoint instead of entering a value, but in testing it tells me that I don’t have any devices capable of this. Does my Stelpro just not make this information available to the rest of my network, or is there something I am missing?

Thanks all, I appreciate it.

See how your device handler is setup. Likely it’s using capability.thermostat, use that to select it from your SmartApp and then retrieve the heating and cooling setpoints and pass them over to your own thermostat.