Sunrise/Sunset by SmartThings (Offsets not called) Here is the FIX

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())

Not sure if I should’ve posted somewhere else …

Cheers,
-TD

1 Like

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!!!

here is great razberry app that calculated the times…
http://forum.z-wave.me/viewtopic.php?f=3424&t=21029&hilit=daylight

I use the sunrise/sunset on/off app and it has been horribly unreliable. Maybe your fix is what is needed? Or maybe there’s more problems?

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.

More info here in the tip: One simple home system. A world of possibilities. | SmartThings

2 Likes