Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No WEATHERCHAR for haze/mist #5

Open
maheshjag opened this issue Nov 28, 2014 · 2 comments
Open

No WEATHERCHAR for haze/mist #5

maheshjag opened this issue Nov 28, 2014 · 2 comments

Comments

@maheshjag
Copy link

No matter what city I try, I can't seem to get WEATHERCHAR set to anything other than the default. For reference, the response for "London,UK" today is:

{"coord":{"lon":-0.13,"lat":51.51},"sys":{"type":1,"id":5091,"message":0.5896,"country":"GB","sunrise":1417160409,"sunset":1417190223},"weather":[{"id":721,"main":"Haze","description":"haze","icon":"50d"}],"base":"cmc stations","main":{"temp":284.35,"pressure":1003,"humidity":81,"temp_min":283.15,"temp_max":285.15},"wind":{"speed":5.7,"deg":80},"clouds":{"all":0},"dt":1417190071,"id":2643743,"name":"London","cod":200}

I tried debugging a bit, but gave up after I realised that I don't know quite how you interpret the OpenWeatherMap API responses (and I don't have the inclination to read it now :-) )

@jdotjdot
Copy link
Owner

The important part of the response is this, with the weather IDs:
image

BashWeather uses the weather ID codes to decide what icon to return.

It looks like BashWeather is properly receiving the API response, but the issue here is actually that I have no unicode icon yet for the 700-range of OpenWeatherMap condition identifiers (atmospheric), so the default is returned.

If you suggest a good unicode icon, I'd be happy to add it, or you could submit a pull request. The icons are specified on lines 11-22, and then you would include the check for if the response code starts with 700 in the rather ugly if-statement on lines 180-187.

@maheshjag
Copy link
Author

Okay, sounds good to me. Will come up with something in the next week or
two and get back to you.

Thanks for looking into this.

On Sat, 29 Nov 2014 14:37 J.J. [email protected] wrote:

The important part of the response is this, with the weather IDs:
[image: image]
https://cloud.githubusercontent.com/assets/1328961/5234033/9435fc3c-777c-11e4-9ff8-1918754164bf.png

BashWeather uses the weather ID codes to decide what icon to return.

It looks like BashWeather is properly receiving the API response, but the
issue here is actually that I have no unicode icon yet for the 700-range
http://openweathermap.org/weather-conditions#Atmosphere of
OpenWeatherMap condition identifiers (atmospheric), so the default is
returned.

If you suggest a good unicode icon, I'd be happy to add it, or you could
submit a pull request. The icons are specified on lines 11-22
https://github.com/jdotjdot/BashWeather/blob/master/BashWeather.sh#L11-22,
and then you would include the check for if the response code starts with
700 in the rather ugly if-statement on lines 180-187
https://github.com/jdotjdot/BashWeather/blob/master/BashWeather.sh#L180-187
.


Reply to this email directly or view it on GitHub
#5 (comment).

@jdotjdot jdotjdot changed the title No WEATHERCHAR No WEATHERCHAR for haze/mist Dec 12, 2014
Repository owner deleted a comment from devarya Jan 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants