Weather not working (?)
jonkke8 opened this issue · 12 comments
Basically, my weather widget is not working at all, even after trying to configure the script. I have no clue as to why it doesn't work.
did u switch from xml to yuck ?
did u switch from xml to yuck ?
No, I just installed the older version of eww
Are u sure u have the right key and id ?
Are u sure u have the right key and id ?
I'm sure I do
did u solve this problem?
did u solve this problem?
Nope..
Try to edit the weather_info script, see if it work.
change the weather var and remove echo ${weather} line.
## Get data
get_weather_data() {
weather=$(curl -sf "http://api.openweathermap.org/data/2.5/weather?APPID="$KEY"&id="$ID"&units="$UNIT"")
if [ ! -z "$weather" ]; then
weather_temp=`echo "$weather" | jq ".main.temp" | cut -d "." -f 1`
...
}
change the execute, remove if [[ "$1" == "--getdata" ]]; then
then start new if statement.
## Execute
get_weather_data
if [[ "$1" == "--icon" ]]; then
cat ${cache_weather_icon}
elif [[ "$1" == "--temp" ]]; then
...
fi
Also, you need to remove "" in APIKEY and city Key
## Weather data
KEY="YOUR_KEY" --> KEY=123456789..
ID="YOUR_CITY_ID" --> ID=11234..
UNIT="metric" # Available options : 'metric' or 'imperial'
thanks a lot, this solved my problem
Solved for me as well, thanks!
what is the exact script for open weather?