Skip to content

Instantly share code, notes, and snippets.

@joneilloine
Created May 21, 2014 01:27
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 joneilloine/cd54a3210081af56e3c1 to your computer and use it in GitHub Desktop.
Save joneilloine/cd54a3210081af56e3c1 to your computer and use it in GitHub Desktop.
Test push app
/**
* The Pusher
*
* Author: jesse
* Date: 2013-06-20
*/
// Automatically generated. Make future change here.
definition(
name: "The Pusher",
namespace: "joneilloine",
author: "jesse",
description: "Just a simple app that you can tap to trigger a push notification",
category: "My Apps",
iconUrl: "https://s3.amazonaws.com/smartapp-icons/Convenience/Cat-Convenience.png",
iconX2Url: "https://s3.amazonaws.com/smartapp-icons/Convenience/Cat-Convenience%402x.png"
)
preferences {
section("Configure") {
input "message", "text", title: "What should the pusher push on you?", multiple: false, required: false
}
}
def installed(settings) {
log.debug "Installed"
subscribe(app)
}
def updated(settings) {
log.debug "Updated"
unsubscribe()
subscribe(app)
}
def appTouch (evt) {
log.debug "App Touched"
def m = message ?: "Pushy, push, push!"
sendPush(m)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment