}
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
- }
}
}