Skip to content

Instantly share code, notes, and snippets.

@AndrewReitz
Last active August 29, 2015 14:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AndrewReitz/41c88e1cf43c6c8626de to your computer and use it in GitHub Desktop.
Save AndrewReitz/41c88e1cf43c6c8626de to your computer and use it in GitHub Desktop.
SmartThings Test Pusher
/**
* 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/Cat-Convenience@2x.png")
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