[RELEASE] New Virtual Thermostat With Device

Same here. Even tried to remove and add new thermostat.

Can’t get Heating set point to go above 40 deg F in the new app. Works in the old app. But we’re all going to need to use the new one before too long. Currently are reading Deg F.

edit see below

edit: see below

OK implementing cooling is above my pay grade. Here is my version with the temperature displays fixed, plus the correct vid for this to work in the new app. This version displays in C. If you need it to display F you will have to edit one false/true line in the code, see other posts in this thread about that.



oh yes, many thanks ,i have re-add my thermostats and now its showing the temp fine
do you mind telling me what do i need to edit to be able to put temps below 15?
i tried changing this, it seems to be working only in the old classic app but not the new app
def lowRange() { return shouldReportInCentigrade() ? 4 : 45 }
also it would be nice to be able to chane temps in 0.5 steps, thanks

If editing the low and high ranges doesn’t work you can try a different VID such as radiator-2 radiator-3 but note that these will display unsupported commands like cooling point and fan mode.

Try switching the VID in conjunction with editing the low range and tell me if that solves it for you.

I’m not certain the new app can support increments of .5

i’m not sure what do you mean by VID and radiator 2-3. I couldn’t find any custom device handler called radiator 2 or 3. Could you please elaborate what should i do ? thanks

The VID I set it as is radiator-thermostat but there are other VIDs for thermostats you can find here. the vid is located in the metadata.

I don’t think thermostats support .5 temps but if they did you’d have to change the temperature to a string both in the dth and the smartapp.

1 Like

thanks, i have changed it to generic-radiator-thermostat-2 in metadata and now i can set it up from 4 to 28 C and i have only heating option. Tested with a virtual switch both manually and in automation and all works perfect, cheers
you should probably use that VID default for others that want to set up lower anti freezing temps if they leave their home for longer times
PS: For those reading this, you need to re-add your thermostats after editing the device handler in order for changes to take effect

Hi!I cannot install the Smart App ! Pls help
Which steps??

Hi. I have the Virtual thermostat app set up with a Samsung motion sensor and I’m using the app on a ceiling fan to cool an area. Everything works except that the app sets the fan Speed to 66%. If I try to increase the fan speed, the virtual Thermometer changes the speed back to 66%. Is there a way to make the app set the speed to my choice? Or even set the speed based on temperature?

I managed to get the dual heating/cooling working without the “Emergency Temp” error listed above.
In the Device SmartApp, add the defs getCoolingStatus & shouldCoolingBeOn and then:

def handleChange() {
def thermostat = getThermostat()

//update device

if(thermostat.currentValue('thermostatMode') == "off") {
//set outlet off


if(thermostat.currentValue('thermostatMode') == "heat") {
//set heater outlet
if(shouldHeatingBeOn(thermostat)) {
} else {

} else {

if(thermostat.currentValue('thermostatMode') == "cool") {
//set cooler outlet
if(shouldCoolingBeOn(thermostat)) {
} else {


Can someone please make this available to get updates? I keep getting "you don’t have access message when trying to add repo in IDE

which version is the a patch to? I need cooling, so instead of doing everything myself I’m trying to find the latest version that supports cooling and build on that.

After reading the code a bit, I get where this is coming from. I’m working on adding cooling outlets alongside heating outlets and controlling the thermostatMode as off/heat/cool/auto. Really shouldn’t be too complicated, but as this is my first trial at doing any kind of smarttthings coding, I may be wrong.

I have forked my changes here.

Use the SmartApp With Device and DTH.

Thanks, I did a quick and dirty manual merge of your changes into my changes here: https://github.com/steffennissen/SmartThings-VirtualThermostat-WithDTH

The thermostatOperatingState doesn’t really work with both cooling and heating, I’ll look into fixing that.

Also the heatingSetpoint/coolingSetpoint/thermostatSetpoint are currently forced to always be the same, which doesn’t really make much sense from a thermostat perspective, but in this case there is a tolerance factor which means that it kind of still works. Not at the top of my list right now, but I think it would make sense to get it fixed.

Managed to get cooling/heating/auto to work and get the state to get updated correctly. Also got the setpoint, heatingsetpoint and coolingsetpoint to be independent. On top of this I updated the UI a bit, so it now looks pretty nice. Still have a few additional changes that I want to make, but it’s fairly usable.

It’s all here: https://github.com/steffennissen/SmartThings-VirtualThermostat-WithDTH

This is how it looks like:

I updated my old Virtual Thermostat to your code. In Fahrenheit the minimum temperature for cooling is 71.7 or 72.7. I’m not sure which. The adjustment on on the right side of the main field goes down to 71.7, while the “cool temperature” , all the way on the right in the second column, reads 72.7. They adjust simultaneously regardless of which you adjust and they cannot go below those values. They should be able to get down to 60ºF.

Additionally, with Fahrenheit adjustments it should probably adjust 0.5 or 1.0 degrees per step, rather than 0.1 like celcius prefers.

This might be my fault since I upgraded code rather than uninstalling the old VT and installing yours. I appreciate your work and just wanted to let you know.