forked from bravenel/SmartThings
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rule Machine
34 lines (30 loc) · 928 Bytes
/
Rule Machine
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
definition(
name: "Rule Machine",
singleInstance: true,
namespace: "bravenel",
author: "Mike Maxwell",
description: "Rule Machne",
category: "My Apps",
iconUrl: "https://s3.amazonaws.com/smartapp-icons/ModeMagic/Cat-ModeMagic.png",
iconX2Url: "https://s3.amazonaws.com/smartapp-icons/ModeMagic/[email protected]",
iconX3Url: "https://s3.amazonaws.com/smartapp-icons/ModeMagic/[email protected]"
)
preferences {
page(name: "mainPage", title: "Rules", install: true, uninstall: true,submitOnChange: true) {
section {
app(name: "childRules", appName: "Rule", namespace: "bravenel", title: "Create New Rule...", multiple: true)
}
}
}
def installed() {
initialize()
}
def updated() {
unsubscribe()
initialize()
}
def initialize() {
childApps.each {child ->
log.info "Installed Rules: ${child.label}"
}
}