This Task with download the sunrise and sunset times for your location based on GPS or Network Locations.
Press Tasks
New Task - Name: Sunrise - Ok
"+" - Misc - Get Location. Pick network, GPS, or any, all three should work.
"+" - Variable - Variable Split - %LOC - Splitter: , - Done
"+" - Net - HTTP Get - server: gws2.maps.yahoo.com/findlocation?pf=1&locale=en_US&flags=&offset=15&gflags=R&q=%LOC1+%LOC2&start=0&count=100
"+" - Variable - Variable Split - %HTTPD - Splitter: </woeid> - Done
"+" - Variable - Variable Split - %HTTPD1 - Splitter: <woeid> - Done
"+" - Net - HTTP Get - server: weather.yahooapis.com/forecastrss?w=%HTTPD12 - Mime Type: text/xml - Done
"+" - Variable - Variable Split - %HTTPD - Splitter: sunrise=" - Done
"+" - Variable - Variable Split - %HTTPD2 - Splitter: sunset=" - Done
"+" - Variable - Variable Split - %HTTPD21 - Splitter: am - Done
"+" - Variable - Variable Set - %SUNRISERAW to %HTTPD211 - Done
"+" - Variable - Variable Split - %HTTPD22 - Splitter: pm - Done
"+" - Variable - Variable Set - %SUNSETRAW to %HTTPD221 - Done
"+" - Variable - Variable Split - %SUNRISERAW - Splitter: : - Done
"+" - Variable - Variable Set - %SUNRISE to %SUNRISERAW1.%SUNRISERAW2 - Done
"+" - Variable - Variable Split - %SUNSETRAW - Spitter: : - Done
"+" - Variable - Variable Add - %SUNSETRAW1 - Value: 12 - Done
"+" - Variable - Variable Set - %SUNSET to %SUNSETRAW1.%SUNSETRAW2 - Done
Now you can add this task to any profile you want to use sunrise and sunset data. This will not automatically get the data for you, you need something to call this task.
I use this in conjunction with the weather changing backgrounds to set the Night condition in that profile.
If you need any help please find me (NebulaOcton) on this thread
http://www.droidforums.net/forum/droid-applications/66195-what-have-you-done-tasker.html
The following is Joeviocoe's version using the same principle as the Original. But using earthtools.org instead of yahooapis.com (simpler date/time formatting ) as well as a fix for time calculations for the Calendar Insert action (Tasker 1.1+).
The Sunshine - Check.prf.xml profile includes two tasks (Sun Data and Sun Calendar). Sun Data will set the %Sunrise and %Sunset variables… and Sun Calendar will add those sunshine times to your Google calender called "Tasker" (must be created first).
The Sunshine.prf.xml profile is just an example of how to use a Google Calendar entry to trigger tasks (for this, I control screen brightness).
Respond to me (Joeviocoe) here:
Tasker Forum
Tested using Tasker 1.1.1u1
http://tasker.wikidot.com/local--files/sunrise-and-sunset-times/Sunshine___Check.prf.xml
http://tasker.wikidot.com/local--files/sunrise-and-sunset-times/Sunshine.prf.xml
See the files link below for an XML export of most of this that you can import into Tasker.