From: Seyed Amir Hossein Aqajari Date: Wed, 7 Aug 2019 00:56:37 +0000 (-0700) Subject: Update Light_Rule.groovy X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=1aba2e759e4b97770503f9d871b8e9f2041664d9;p=smartapps.git Update Light_Rule.groovy --- diff --git a/official/Light_Rule.groovy b/official/Light_Rule.groovy index d9c090f..949c96c 100644 --- a/official/Light_Rule.groovy +++ b/official/Light_Rule.groovy @@ -48,25 +48,20 @@ def mainPage() { } def namePage() { + section { + input "overrideLabel", "bool", title: "Edit automation name", defaultValue: "false", required: "false", submitOnChange: true + } if (!overrideLabel) { // if the user selects to not change the label, give a default label def l = "$contactSensor turns on $light" log.debug "will set default label of $l" - app.updateLabel(l) } dynamicPage(name: "namePage") { if (overrideLabel) { section("Automation name") { - label title: "Enter custom name", defaultValue: app.label, required: false - } - } else { - section("Automation name") { - paragraph app.label + label title: "Enter custom name", required: false } } - section { - input "overrideLabel", "bool", title: "Edit automation name", defaultValue: "false", required: "false", submitOnChange: true - } } }