Skip to content

Commit 99f10eb

Browse files
committed
trying to modify so that Mode changes invokes a tempCheck
1 parent f00d4a8 commit 99f10eb

1 file changed

Lines changed: 13 additions & 8 deletions

File tree

smartapps/dcoffing/evap-cooler-thermostat.src/evap-cooler-thermostat.groovy

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@
1717
Change Log
1818
2016-07-02b. fixed mode bug not shutting of evap by changing mode technique, cleaned up code with shutdownEvap()
1919
a. modify dynamic feedback of inputs to be via paragraph technique
20-
2016-07-01 changed user select mode method, changed default delay-on to 1.5
20+
2016-07-01 changed user select mode method, changed default delay-on to 1.5, removed the default setpoint because
21+
ST still requires the user to make a change to get around Required input flag.
2122
2016-06-30 added dynamic temperature display readout to Room Setpoint Temp input for ease of troubleshooting
2223
2016-06-28 x.1 version update
2324
f. added submitOnChange for motion so to skip minutes input next if no motion selected
@@ -60,7 +61,7 @@ definition(
6061
preferences {
6162
page(name: "mainPage", title: "")
6263
page(name: "optionsPage", title: "")
63-
page(name: "aboutPage", title: "About")
64+
page(name: "aboutPage", title: "")
6465
}
6566

6667
def mainPage() {
@@ -79,7 +80,7 @@ def mainPage() {
7980
input "setpoint", "decimal", title: "Room Setpoint Temp", required: true
8081
}
8182

82-
section("Current Conditions are"){
83+
section("Current Conditions are"){ //The 'if' statements used below prevent null error crash
8384
if (fanMotor) {
8485
paragraph ("${fanMotor.displayName} is ${fanMotor.currentSwitch}")
8586
}
@@ -159,7 +160,7 @@ def optionsPage() {
159160

160161
def aboutPage() {
161162
dynamicPage(name: "aboutPage", title: none, install: true, uninstall: true) {
162-
section("User's Guide; Evap Cooler Thermostat") {
163+
section("User's Guide for Evap Cooler Thermostat") {
163164
paragraph textHelp()
164165
}
165166
}
@@ -180,7 +181,8 @@ def updated() {
180181
def initialize() {
181182
log.debug "def INITIALIZE with settings: ${settings}"
182183
subscribe(tempSensor, "temperature", temperatureHandler) //call temperatureHandler method when any reported change to "temperature" attribute
183-
if (motionSensor) {
184+
subscribe(location, "mode", modeChangedHandler) //call modeChangedHandler with any reported change to "mode" change attribute
185+
if (motionSensor) {
184186
subscribe(motionSensor, "motion", motionHandler) //call the motionHandler method when there is any reported change to the "motion" attribute
185187
}
186188
}
@@ -191,7 +193,6 @@ def shutdownEvap() {
191193
fanSpeed.off()
192194
}
193195

194-
//Event Handler Methods
195196
def temperatureHandler(evt) {
196197
log.debug "temperatureHandler called: $evt"
197198
handleTemperature(evt.doubleValue)
@@ -295,10 +296,11 @@ if (currentModeAllowed(settings.selectedModes)) {
295296
}
296297

297298
}
298-
else {
299+
else { // if current ST mode does NOT match one of the user selected modes.
299300
shutdownEvap()
300301
}
301302
}
303+
302304
def currentModeAllowed(allowedModes) {
303305
return (!allowedModes || allowedModes?.find{it == location.mode})
304306
}
@@ -333,5 +335,8 @@ private def textHelp() {
333335
" You might consider using a Remotec ZFM-80 15amp relay for fan motor on-off, if you desire both"+
334336
" pump and fan speed then Enerwave ZWN-RSM2 dual 10amp relays to control pump and the second relay"+
335337
" to control hi-lo speed via Omoron LY1F SPDT 15amp relay. For only pump control any single switch could"+
336-
" work like the Enerwave ZWN-RSM1S or Monoprice #11989 Z-Wave In-Wall On/Off module"
338+
" work like the Enerwave ZWN-RSM1S or Monoprice #11989 Z-Wave In-Wall On/Off module. \n\n"+
339+
340+
" To uninstall the smartapp simply click REMOVE below"
341+
337342
}

0 commit comments

Comments
 (0)