projects
/
smartapps.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Changing remote branch to PLRG Git server.
[smartapps.git]
/
official
/
01-control-lights-and-locks-with-contact-sensor.groovy
diff --git
a/official/01-control-lights-and-locks-with-contact-sensor.groovy
b/official/01-control-lights-and-locks-with-contact-sensor.groovy
index 7099bcbf984d6daa60a5843846d22a815bbd1237..83f8a4522fbca3a40acb0c9a20396076316ff6e1 100644
(file)
--- a/
official/01-control-lights-and-locks-with-contact-sensor.groovy
+++ b/
official/01-control-lights-and-locks-with-contact-sensor.groovy
@@
-13,6
+13,7
@@
* for the specific language governing permissions and limitations under the License.
*
*/
* for the specific language governing permissions and limitations under the License.
*
*/
+
definition(
name: "Example: Control a switch and lock with a contact sensor",
namespace: "com.smarthings.developers",
definition(
name: "Example: Control a switch and lock with a contact sensor",
namespace: "com.smarthings.developers",
@@
-50,7
+51,6
@@
def updated() {
// This function is where you initialize callbacks for event listeners
def initialize() {
// This function is where you initialize callbacks for event listeners
def initialize() {
- // The subscribe function takes a input, a state, and a callback method
subscribe(contact, "contact.open", openHandler)
subscribe(contact, "contact.closed", closedHandler)
}
subscribe(contact, "contact.open", openHandler)
subscribe(contact, "contact.closed", closedHandler)
}