Merge branch 'master' of ssh://plrg.eecs.uci.edu/home/git/smartthings-infrastructure
authorrtrimana <rtrimana@uci.edu>
Thu, 26 Sep 2019 19:02:05 +0000 (12:02 -0700)
committerrtrimana <rtrimana@uci.edu>
Thu, 26 Sep 2019 19:02:05 +0000 (12:02 -0700)
Thermostat/Thermostat.groovy
Thermostat/Thermostats.groovy

index b758a4ace45fa8671286c0d548a4f66313a53cae..41a351cd2470043f10445ba3d10787c18649b8f4 100644 (file)
@@ -72,7 +72,7 @@ public class Thermostat {
                if (this.coolingSetpoint != coolingSetpoint) {
                        this.latestCoolingSetPoint = coolingSetpoint
                        this.coolingSetpoint = coolingSetpoint
-                       this.currentCoolingSetpoint = currentCoolingSetpoint
+                       this.currentCoolingSetpoint = coolingSetpoint
                        println("Cooling set point for the thermostat with id:$id is changed to $coolingSetpoint!")
                        sendEvent([name: "coolingSetpoint", value: "$coolingSetpoint", deviceId: this.id, descriptionText: "",
                                   displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}'])
@@ -87,7 +87,7 @@ public class Thermostat {
                if (this.heatingSetpoint != heatingSetpoint) {
                        this.latestHeatingSetPoint = heatingSetpoint
                        this.heatingSetpoint = heatingSetpoint
-                       this.currentHeatingSetpoint = currentHeatingSetpoint
+                       this.currentHeatingSetpoint = heatingSetpoint
                        println("Heating set point for the thermostat with id:$id is changed to $heatingSetpoint!")
                        sendEvent([name: "heatingSetpoint", value: "$heatingSetpoint", deviceId: this.id, descriptionText: "",
                                   displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}'])
@@ -116,7 +116,7 @@ public class Thermostat {
                if (this.thermostatMode != thermostatMode) {
                        this.thermostatLatestMode =thermostatMode
                        this.thermostatMode = thermostatMode
-                       this.currentThermostatMode = currentThermostatMode
+                       this.currentThermostatMode = thermostatMode
                        println("Mode of the thermostat with id:$id is changed to $thermostatMode!")
                        sendEvent([name: "thermostatMode", value: "$thermostatMode", deviceId: this.id, descriptionText: "",
                                   displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}'])
index 2d0bc6c87558abc3c68db150e88e66fcd8761277..620aca10a296f54d5e91c1c1d75654fa763c4db7 100644 (file)
@@ -25,13 +25,13 @@ public class Thermostats{
        private supportedThermostatFanModes = ["auto", "fanCirculate", "circulate", "fanOn", "on"]
        private supportedThermostatModes = ["auto", "cool", "emergencyHeat", "heat", "off"]
        private String thermostatOperatingState = "cooling"
-       private String thermostatFanMode = "auto"
-       private String thermostatMode = "auto"
-       private String currentThermostatMode = "auto"
+       private String thermostatFanMode = "off"
+       private String thermostatMode = "off"
+       private String currentThermostatMode = "off"
        private String climateName = ""
-       private String thermostatLatestMode = "auto"
+       private String thermostatLatestMode = "off"
        private String thermostatLatestOperatingState = "cooling"
-       private String thermostatLatestFanMode = "auto"
+       private String thermostatLatestFanMode = "off"
        private int latestCoolingSetPoint = 70
        private int latestThermostatSetPoint = 60
        private int latestHeatingSetPoint = 50
@@ -51,11 +51,11 @@ public class Thermostats{
                        this.currentHeatingSetpoint = 35
                        this.heatingSetpoint = 35
                        this.thermostatSetpoint = 50
-                       this.thermostatFanMode = "auto"
-                       this.thermostatLatestFanMode = "auto"
-                       this.thermostatMode = "auto"
-                       this.currentThermostatMode = "auto"
-                       this.thermostatLatestMode = "auto"
+                       this.thermostatFanMode = "off"
+                       this.thermostatLatestFanMode = "off"
+                       this.thermostatMode = "off"
+                       this.currentThermostatMode = "off"
+                       this.thermostatLatestMode = "off"
                } else {
                        this.temperature = 66
                        this.currentTemperature = 66
@@ -141,7 +141,7 @@ public class Thermostats{
                if (thermostatMode != this.thermostatMode) {
                        this.thermostatLatestMode = thermostatMode
                        this.thermostatMode = thermostatMode
-                       this.currentThermostatMode = currentThermostatMode
+                       this.currentThermostatMode = thermostatMode
                        thermostats[0].setThermostatMode(thermostatMode)
                }
        }