Last active
August 29, 2015 14:04
-
-
Save AndrewReitz/41c88e1cf43c6c8626de to your computer and use it in GitHub Desktop.
SmartThings Test Pusher
This file contains 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
/** | |
* 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