From a8628b734308626021806ac0f2f07ef2f6c7e7ac Mon Sep 17 00:00:00 2001 From: tslagle13 Date: Tue, 29 Mar 2016 17:12:28 -0700 Subject: [PATCH] Make timeIntervalInput dynamic page Forgot to make timeIntervalInput a dynamic page so it can update view on selection. --- .../vacation-lighting-director.groovy | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/smartapps/tslagle13/vacation-lighting-director.src/vacation-lighting-director.groovy b/smartapps/tslagle13/vacation-lighting-director.src/vacation-lighting-director.groovy index 8ea150e..517d5ee 100644 --- a/smartapps/tslagle13/vacation-lighting-director.src/vacation-lighting-director.groovy +++ b/smartapps/tslagle13/vacation-lighting-director.src/vacation-lighting-director.groovy @@ -40,6 +40,7 @@ preferences { page name:"pageSetup" page name:"Setup" page name:"Settings" + page name: "timeIntervalInput" } @@ -185,7 +186,8 @@ def Settings() { } } -page(name: "timeIntervalInput", title: "Only during a certain time", refreshAfterSelection:true) { +def timeIntervalInput() { + dynamicPage(name: "timeIntervalInput") { section { input "startTimeType", "enum", title: "Starting at", options: [["time": "A specific time"], ["sunrise": "Sunrise"], ["sunset": "Sunset"]], defaultValue: "time", submitOnChange: true if (startTimeType in ["sunrise","sunset"]) { @@ -204,9 +206,10 @@ page(name: "timeIntervalInput", title: "Only during a certain time", refreshAfte input "ending", "time", title: "End time", required: false } } - + } } + def installed() { initialize() }