I'm taking my first crack at trying to fix a code error in the Holiday Color Lights app. I am slowly making some progress using the Hubitat built in editor.
The specific error I am trying to address is:
groovy.lang.MissingMethodException: No signature of method: com.hubitat.hub.domain.Location.currentState() is applicable for argument types: (java.lang.String) values: [sunsetTime] on line 157 (changeHandler)
Here is the section of code generating the error. I've highlighted line 157 in bold and italic.
private timeWindowStart() {
def result = null
if (startTimeType == "sunrise") {
result = location.currentState("sunriseTime")?.dateValue
if (result && startTimeOffset) {
result = new Date(result.time + Math.round(startTimeOffset * 60000))
}
}
else if (startTimeType == "sunset") {
result = location.currentState("sunsetTime")?.dateValue
if (result && startTimeOffset) {
result = new Date(result.time + Math.round(startTimeOffset * 60000))
}
}
else if (starting && location.timeZone) {
result = timeToday(starting, location.timeZone)
}
log.trace "timeWindowStart = ${result}"
result
}
Based on what I've Google'd on the error, it seems that there is a parameter missing or incorrectly formatted. If I read it correctly, it is calling a Hubitat routine, Location.currentState(). I'm not sure where to take it from here.
Does anyone have any insight as to what might be wrong? Thanks.