From 8ba49a8979c5fb613134e2d0b5e5c6c0f456f85b Mon Sep 17 00:00:00 2001 From: rtrimana Date: Tue, 6 Aug 2019 13:05:13 -0700 Subject: [PATCH] Just doing 2 states for Thermostat:temporary patch. --- Lock/Locks.groovy | 12 ++++++------ Thermostat/Thermostats.groovy | 30 +++++++++++++++++++++++++++++- 2 files changed, 35 insertions(+), 7 deletions(-) diff --git a/Lock/Locks.groovy b/Lock/Locks.groovy index 626b244..e818888 100644 --- a/Lock/Locks.groovy +++ b/Lock/Locks.groovy @@ -25,16 +25,16 @@ public class Locks{ this.deviceNumbers = deviceNumbers this.locks = [] - def init = Verify.getBoolean() + /*def init = Verify.getBoolean() if (init) { this.lockState = "locked" - this.currentLock = "locked" - this.lockLatestValue = "locked" + this.currentLock = "locked" + this.lockLatestValue = "locked" } else { this.lockState = "unlocked" - this.currentLock = "unlocked" - this.lockLatestValue = "unlocked" - } + this.currentLock = "unlocked" + this.lockLatestValue = "unlocked" + }*/ locks.add(new Lock(sendEvent,id, label, displayName, this.lockState, this.lockLatestValue)) } diff --git a/Thermostat/Thermostats.groovy b/Thermostat/Thermostats.groovy index 59d6bca..c793fb9 100644 --- a/Thermostat/Thermostats.groovy +++ b/Thermostat/Thermostats.groovy @@ -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, -- 2.34.1