-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstep-down_rules.groovy
More file actions
52 lines (42 loc) · 1.08 KB
/
Copy pathstep-down_rules.groovy
File metadata and controls
52 lines (42 loc) · 1.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
definition(
name: "Step-down Rules",
singleInstance: true,
namespace: "BD",
author: "Bobby Dobrescu",
description: "Create step-down rules to alert family members that lights are about to turn off",
category: "Convenience",
iconUrl: "",
iconX2Url: "",
installOnOpen: true
)
preferences {
page(name: "mainPage")
page(name: "removePage")
}
def mainPage() {
dynamicPage(name: "mainPage", title: " ", install: true, uninstall: false) {
section {
app(name: "childButtons", appName: "Step-Down Rule", namespace: "BD", title: "Create a new Step-down Rule", multiple: true, displayChildApps: false)
paragraph(" ")
href "removePage", title: "Remove Step-down Rules", description: ""
}
}
}
def removePage() {
dynamicPage(name: "removePage", title: "Remove all Step-down Rules", install: false, uninstall: true) {
section ("WARNING!\n\nRemoving removes all Step-down Rules\n") {
}
}
}
def installed() {
initialize()
}
def updated() {
unsubscribe()
initialize()
}
def initialize() {
createLocationVariable("SDRruleList", ruleList(), true)
}
def removeChild(ch) {
}