From 1aba2e759e4b97770503f9d871b8e9f2041664d9 Mon Sep 17 00:00:00 2001 From: Seyed Amir Hossein Aqajari Date: Tue, 6 Aug 2019 17:56:37 -0700 Subject: [PATCH] Update Light_Rule.groovy --- official/Light_Rule.groovy | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) 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 - } } } -- 2.34.1