Created
August 21, 2013 17:40
-
-
Save vlaminck/6297536 to your computer and use it in GitHub Desktop.
First pass at doors preferences
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
/** | |
* Doors Test | |
* | |
* Author: steve | |
* Date: 2013-08-19 | |
*/ | |
preferences { | |
page(name:"label", title:"SmartAppLabel", nextPage:"smartApps") { | |
section("You don't have any doors, let's add one!"){ | |
input "text1", "text", multiple:false, required:false, title:"text" | |
} | |
} | |
page(name:"smartApps", title:"SmartApps") { | |
section("What do you want to do with this door?") { | |
href "know", title:"Know if it's opened or closed" | |
} | |
} | |
page(name:"know", title:"know") { | |
section("Know and control when the door is locked") { | |
input "openClose", "capability.contactSensor", title:"Choose an open/close sensor" | |
input "alerts", "notification", title:"Choose the alerts that you want", description:"Mobile Notification" | |
input "time", "time", title:"Only during a certain time" | |
input "days", "enum", title:"Only on certain days of the week", multiple:true, options:["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"] | |
input "makeMyDay", "mode", title:"Only when make my day is...", multiple:true | |
} | |
} | |
page(name:"alerts", title:"alerts") { | |
section ("Choose the alerts you want") { | |
input "push", "bool", title:null, description:"Mobile Notification" | |
input "text", "phone", title:"get a text message", description:"phone number" | |
} | |
} | |
page(name:"time", title:"time", install:true) { | |
section ("Only during a certain time") { | |
input "startTime", "time", title:"Starting time" | |
input "endTime", "time", title:"Ending time" | |
} | |
} | |
} | |
def secretPage() { | |
section("You hit the 'Next' button") { | |
input "awesome1", "superCoolTypeThatIsNotSupported", title:null, description:"You Are Awesome!" | |
} | |
} | |
def installed() { | |
log.debug "Installed with settings: ${settings}" | |
initialize() | |
} | |
def updated() { | |
log.debug "Updated with settings: ${settings}" | |
unsubscribe() | |
initialize() | |
} | |
def initialize() { | |
// TODO: subscribe to attributes, devices, locations, etc. | |
} | |
// TODO: implement event handlers |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment