A search only turned up lots of issues and some coding questions about sunrise/sunset. I’m trying to find out where ST pulls the actual times from and is there any place I can actually see the values ST pulled?
I know it’s using my Location settings, but what service is it using (Google?)?
Funny, I just came here to post this exact question. I have some lighting set to come on when I arrive home and it’s between sunset and sunrise. No matter when I come home, the lights come on.
In any CoRE piston, on the dashboard, under System Variables, you’ll find the sunset and sunrise date/times listed… rough workaround, but it’s a quick glance…
Thanks @JDRoberts, this was a very helpful start. But it still leave a problem:
My global coordinates are correct, but the sunrise time (listed about 7am) is about 30 minutes late and sunset time (listed about 4:50pm) is 2 hours early according to Google. Also this morning the routine activated about an hour before the listed time. How often does the sunrise/sunset refresh in SmartThings? Why does the routine not happen at the time listed in the IDE?
What you are seeing is a completely different problem than the issues discussed in this thread. There’s a platform bug right now where many accounts are running on UTC time rather than their own time zone. This is causing routines and automations to run at the wrong time.. Typically routines are running early in the US and late from the UK. But if you check the times you’ll see that they are already on UTC time.
Since it’s a bug, it doesn’t matter what your account says about your time zone – – it’s running everything on UTC time.
This issue has been listed on the official status page and there are several threads discussing it today.
I realize this is an old thread however I am unable to find the sunset and sunrise times using the method described above. My IDE account location does not show a “weather section” with times. Am I missing something or has the sunset and sunrise times moved somewhere else?
The sunrise and sunset times are made available to legacy apps by the Weather Station app as you’ve seen - the app sends out events at your local sunrise and sunset, and then sends out events updating the times for the next day a little while after sunset.
In the ‘new’ environment other methods are used but the information is certainly available in the API. In Curl speak you can do:
I’m not suggesting that is in any way an optimal or even an approved way of accessing the information, only making clear that the information is certainly sitting there in the API for apps to use.
I tried following those same instructions and the Weather Station app never shows up. I can’t see when it thinks sunrise and sunset are, but it is off by about 45 minutes. Do you happen to know a more direct way to add the Weather Station app? Since I don’t have it listed I wonder what is actually setting my sunrise/sunset times.
you can install Smart Lighting if it is available in your region. then create a smart lighting rule that includes sunrise/sunset and allow 24 hours to sync the times.