Feb-09-2022, 11:41 AM
Hi @menator01 , great code, thank you. I immediately used parts of it, I hope you don't mind .
But to my surprise the sunrise and sunset times were not correct. I found the reason why: you use parameter "lon" for the longitude, but it should be "lng".
But to my surprise the sunrise and sunset times were not correct. I found the reason why: you use parameter "lon" for the longitude, but it should be "lng".
params = {'lat': lat, 'lon': lon, 'formatted': 0, 'date': 'today'} # should be: params = {'lat': lat, 'lng': lon, 'formatted': 0, 'date': 'today'}