def initialize() {
state.changed = false
- subscribe(sensors, 'contact', "sensorChange")
+ subscribe(sensors, "contact", sensorChange)
}
def sensorChange(evt) {
log.debug "Setting thermostat to $state.thermostatMode"
thermostat.setThermostatMode(state.thermostatMode)
state.changed = false
-}
\ No newline at end of file
+}