Hi all, Thought I’d pass this along, Offsets not properly called/working in the SmartThings provided “Sunrise/Sunset” SmartApp around line 88. def astroCheck() { def s = getSunriseAndSunset(zipCode: zipCode, sunriseOffset: sunriseOffset, sunsetOffset: sunsetOffset)
Should be:
def astroCheck() {
def s = getSunriseAndSunset(zipCode: zipCode, sunriseOffset: getSunriseOffset(), sunsetOffset: getSunsetOffset())
can we have a sunrise/sunset app that calculates the times uses latitude and longitude rather then looking up on a web site what they are! I don’t like being dependent on connectivity!!!
This is often the source of some confusion, for understandable reasons.
Groovy adds some convenience around property/getter access, assuming JavaBean standards. Basically that just means that if you have a method called getFoo(), you can call it just through property access: foo.
So in the example above, when you see sunriseOffset, it will actually call the getSunriseOffset() method. They can be used interchangeably.