Checking device handlers.
[smartthings-infrastructure.git] / Thermostat / Thermostats.groovy
index acbb23ee1975d501e3cb613799d24edcac239973..2d0bc6c87558abc3c68db150e88e66fcd8761277 100644 (file)
@@ -163,7 +163,7 @@ public class Thermostats{
                        thermostats[0].heat()
                }
        }
-
+       
        def auto() {
                if (thermostatMode != "auto") {
                        this.thermostatLatestMode = "auto"
@@ -173,6 +173,15 @@ public class Thermostats{
                }
        }
 
+       def emergencyHeat() {
+               if (thermostatMode != "emergencyHeat") {
+                       this.thermostatLatestMode = "emergencyHeat"
+                       this.thermostatMode = "emergencyHeat"
+                       this.currentThermostatMode = "emergencyHeat"
+                       thermostats[0].emergencyHeat()
+               }
+       }
+
        def off() {
                if (thermostatMode != "off") {
                        this.thermostatLatestMode = "off"