mirror of
https://github.com/mtan93/SmartThingsPublic.git
synced 2026-04-01 22:04:34 +01:00
Make timeIntervalInput dynamic page
Forgot to make timeIntervalInput a dynamic page so it can update view on selection.
This commit is contained in:
@@ -40,6 +40,7 @@ preferences {
|
|||||||
page name:"pageSetup"
|
page name:"pageSetup"
|
||||||
page name:"Setup"
|
page name:"Setup"
|
||||||
page name:"Settings"
|
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 {
|
section {
|
||||||
input "startTimeType", "enum", title: "Starting at", options: [["time": "A specific time"], ["sunrise": "Sunrise"], ["sunset": "Sunset"]], defaultValue: "time", submitOnChange: true
|
input "startTimeType", "enum", title: "Starting at", options: [["time": "A specific time"], ["sunrise": "Sunrise"], ["sunset": "Sunset"]], defaultValue: "time", submitOnChange: true
|
||||||
if (startTimeType in ["sunrise","sunset"]) {
|
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
|
input "ending", "time", title: "End time", required: false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
def installed() {
|
def installed() {
|
||||||
initialize()
|
initialize()
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user