Just doing 2 states for Thermostat:temporary patch.
[smartthings-infrastructure.git] / Thermostat / Thermostats.groovy
index 59d6bcae99c3ebf95208d97f16c974aabda5538a..c793fb9d75a26fe7406d764a6991e0a7254b48df 100644 (file)
@@ -46,7 +46,7 @@ public class Thermostats{
                this.deviceNumbers = deviceNumbers
                this.thermostats = []
 
-               def initTemperature = Verify.getIntFromList(60, 66)
+               /*def initTemperature = Verify.getIntFromList(60, 66)
                this.temperature = initTemperature
                this.currentTemperature = initTemperature
                
@@ -100,6 +100,34 @@ public class Thermostats{
                        this.thermostatMode = "off"
                        this.currentThermostatMode = "off"
                        this.thermostatLatestMode = "off"
+               }*/
+               def init = Verify.getBoolean()
+               if (init) {
+                       this.temperature = 60
+                       this.currentTemperature = 60
+                       this.currentCoolingSetpoint = 70
+                       this.coolingSetpoint = 70
+                       this.currentHeatingSetpoint = 35
+                       this.heatingSetpoint = 35
+                       this.thermostatSetpoint = 50
+                       this.thermostatFanMode = "auto"
+                       this.thermostatLatestFanMode = "auto"
+                       this.thermostatMode = "auto"
+                       this.currentThermostatMode = "auto"
+                       this.thermostatLatestMode = "auto"
+               } else {
+                       this.temperature = 66
+                       this.currentTemperature = 66
+                       this.currentCoolingSetpoint = 80
+                       this.coolingSetpoint = 80
+                       this.currentHeatingSetpoint = 50
+                       this.heatingSetpoint = 50
+                       this.thermostatSetpoint = 60
+                       this.thermostatFanMode = "circulate"
+                       this.thermostatLatestFanMode = "circulate"
+                       this.thermostatMode = "off"
+                       this.currentThermostatMode = "off"
+                       this.thermostatLatestMode = "off"               
                }
 
                thermostats.add(new Thermostat(sendEvent, id, label, displayName, this.temperature, this.currentCoolingSetpoint,