Closed elpaul closed 5 years ago
The lines you'd need to play with are at 353 and 354 of pydPiper.py.
querystr = 'http://dataservice.accuweather.com/forecasts/v1/daily/1day/' + pydPiper_config.WEATHER_LOCATION r = requests.get(querystr, { 'apikey': pydPiper_config.WEATHER_API, }, language=pl)
It's will be correct?
Close. It's probably more like...
querystr = 'http://dataservice.accuweather.com/forecasts/v1/daily/1day/' + pydPiper_config.WEATHER_LOCATION
r = requests.get(querystr, { 'apikey': pydPiper_config.WEATHER_API, language=es-es })
You'll want to look up the appropriate localization code from https://developer.accuweather.com/localizations-by-language. In this example I've used Spain.
Unfortunately, after adding this parameter, the display is permanently dark, But I solved it in a different way
querystr = 'http://dataservice.accuweather.com/forecasts/v1/daily/1day/2xxx5.json?apikey=xxxxxxxxxxxxxxxxxxxxxxxxxyz&language=pl' r = requests.get(querystr)
Can weather information be displayed not from daily forecast, but from current condition? BTW, what do you think about adding "openweathermap"? 60 calls per minute in free program.
accuweather.com allows you to set the response in a specific language:
example: http://api.accuweather.com/currentconditions/v1/335315.json?apikey={your key}&language=es&details=true
Where and how to put it in the code?