Created
March 7, 2013 06:37
-
-
Save joshareed/5105987 to your computer and use it in GitHub Desktop.
Demo AppTouch app
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Test AppTouch | |
* | |
* Author: josh | |
* Date: 2013-03-07 | |
*/ | |
def preferences() { | |
[ | |
sections: [ | |
[ | |
title: "When the door opens/closes...", | |
input: [ | |
[ | |
name: "contact", | |
title: "Where?", | |
type: "capability.contactSensor", | |
description: "Tap to set", | |
multiple: false | |
] | |
] | |
] | |
] | |
] | |
} | |
def installed() { | |
log.debug "Installed with settings: ${settings}" | |
subscribe(contact.contact) | |
subscribe(app) | |
} | |
def updated() { | |
log.debug "Updated with settings: ${settings}" | |
unsubscribe() | |
subscribe(contact.contact) | |
subscribe(app) | |
} | |
def appTouch(event) { | |
log.debug "appTouch" | |
} | |
def contact(event) { | |
log.debug "contact" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment