Skip to content

Instantly share code, notes, and snippets.

@tylerlange
Created September 28, 2015 19:03
Show Gist options
  • Save tylerlange/f0884ca9125970c4b6ca to your computer and use it in GitHub Desktop.
Save tylerlange/f0884ca9125970c4b6ca to your computer and use it in GitHub Desktop.
/**
* PushTester
*
* Copyright 2014 Andrew Reitz
*
*/
definition(
name: "PushTester",
namespace: "com.andrewreitz",
author: "Andrew Reitz",
description: "Used to test push messages",
category: "My Apps",
iconUrl: "https://s3.amazonaws.com/smartapp-icons/Convenience/Cat-Convenience.png",
iconX2Url: "https://s3.amazonaws.com/smartapp-icons/Convenience/[email protected]")
preferences {
section("Test Push") {
}
}
def installed() {
log.debug "Installed with settings: ${settings}"
initialize()
}
def updated() {
log.debug "Updated with settings: ${settings}"
unsubscribe()
initialize()
}
def initialize() {
subscribe(app, touchhandler)
}
def touchhandler(event) {
sendPush("Test Push")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment