X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=official%2FLight_Rule.groovy;h=766716e048786cc504b26ac6f377b0a81d65a6c6;hb=80f62f1335e20b69b02fe82e18ffdafdbd658a58;hp=d9c090fac4212a874c428be71830408d63823a14;hpb=ab9d735cfdc383797e7a6807cf18882c6066f6c0;p=smartapps.git diff --git a/official/Light_Rule.groovy b/official/Light_Rule.groovy index d9c090f..766716e 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 - } } } @@ -91,7 +86,7 @@ def contactHandler(evt){ log.debug evt.name log.debug evt.value log.debug evt.date - log.debug evt.isStateChange() + //log.debug evt.isStateChange() if (evt.value == "open") { turnLightOn()