Skip to content

Instantly share code, notes, and snippets.

@joshareed
Created March 7, 2013 06:37
Show Gist options
  • Save joshareed/5105987 to your computer and use it in GitHub Desktop.
Save joshareed/5105987 to your computer and use it in GitHub Desktop.
Demo AppTouch app
/**
* 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