From 04a1c2977cec5cc444bde98bb0276f43fbc25fdb Mon Sep 17 00:00:00 2001 From: Seyed Amir Hossein Aqajari Date: Mon, 5 Aug 2019 15:43:23 -0700 Subject: [PATCH] Update bright-when-dark-and-or-bright-after-sunset.groovy --- .../bright-when-dark-and-or-bright-after-sunset.groovy | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/official/bright-when-dark-and-or-bright-after-sunset.groovy b/official/bright-when-dark-and-or-bright-after-sunset.groovy index f105423..a8f8daf 100755 --- a/official/bright-when-dark-and-or-bright-after-sunset.groovy +++ b/official/bright-when-dark-and-or-bright-after-sunset.groovy @@ -4,6 +4,7 @@ definition( author: "Arnaud", description: "Turn ON light(s) and/or dimmer(s) when there's movement and the room is dark with illuminance threshold and/or between sunset and sunrise. Then turn OFF after X minute(s) when the brightness of the room is above the illuminance threshold or turn OFF after X minute(s) when there is no movement.", category: "Convenience", + iconUrl: "http://neiloseman.com/wp-content/uploads/2013/08/stockvault-bulb128619.jpg", iconX2Url: "http://neiloseman.com/wp-content/uploads/2013/08/stockvault-bulb128619.jpg" ) @@ -20,6 +21,8 @@ preferences page(name: "configurations") page(name: "options") + + } def configurations() @@ -82,7 +85,7 @@ def options() } section ("Zip code (optional, defaults to location coordinates when location services are enabled)...") { - input "zipCode", "text", title: "Zip Code?", required: false, description: "Local Zip Code" + input "zipCodeText", "text", title: "Zip Code?", required: false, description: "Local Zip Code" } } } @@ -144,7 +147,7 @@ def options() } section ("Zip code (optional, defaults to location coordinates when location services are enabled)...") { - input "zipCode", "text", title: "Zip Code?", required: false, description: "Local Zip Code" + input "zipCodeText", "text", title: "Zip Code?", required: false, description: "Local Zip Code" } } } @@ -656,7 +659,7 @@ def turnOffDimmers() def astroCheck() { - def s = getSunriseAndSunset(zipCode: zipCode, sunriseOffset: sunriseOffset, sunsetOffset: sunsetOffset) + def s = getSunriseAndSunset(zipCode: zipCodeText, sunriseOffset: sunriseOffset, sunsetOffset: sunsetOffset) state.riseTime = s.sunrise.time state.setTime = s.sunset.time log.debug "Sunrise: ${new Date(state.riseTime)}($state.riseTime), Sunset: ${new Date(state.setTime)}($state.setTime)" -- 2.34.1