mzeryck / Weather-Cal

This is a Scriptable widget that lets you display, position, and format multiple elements, including dates and events, weather information, battery level, and more. You can even create your own elements.
MIT License
808 stars 316 forks source link

Problems with the weather #167

Closed WetTiger closed 2 years ago

WetTiger commented 2 years ago

Hi there, I have added a valid OpenWeathermap API key. -> no weather information is shown. I have set the OpenWeather locale to "de" -> no weather is shown. And if I set "show location name" to "true" I can't even preview the widget anymore. I get the message "Error on line 1803:39: Expected value of type string but got value of type null."

Do you have any idea how I can fix this?

Many thanks!

WetTiger commented 2 years ago

Ok, I think I have figured it out: gps location permission wasn't given for scriptable. Now it worked. Is there a way to set a fixed location? I don't want my gps to run/track everytime I use the script...

icsAT commented 2 years ago

@WetTiger I am not sure, but the location is cached. If you remove the permission the script should use the cache. What I am not sure about at the moment is, that the cache will expire after some time. Hopefully then it will still use the outdated cache if it could not get a new location. Just try to remove the permission and look what will happen.

mvan231 commented 2 years ago

@WetTiger @icsAT You can specify the location sent to OpenWeatherMap so that it will just use the fixed location but keep in mind that when traveling outside that area, your weather data won't be accurate

mzeryck commented 2 years ago

Both of these options should work (either allowing GPS once and using the cache, or manually setting the location). Thanks @icsAT and @mvan231!