Skip to content

Conversation

@shahnewaz-labib
Copy link

Tested with:

{"coord":{"lon":15.4306,"lat":40.9021},"weather":[{"id":801,"main":"Clouds","description":"few clouds","icon":"02n"}],"base":"stations","main":{"temp":-0.08,"feels_like":-2.89,"temp_min":-0.98,"temp_max":0.08,"pressure":1018,"humidity":76,"sea_level":1018,"grnd_level":945},"visibility":10000,"wind":{"speed":2.46,"deg":200,"gust":2.42},"clouds":{"all":19},"dt":1701061471,"sys":{"type":2,"id":2035784,"country":"IT","sunrise":1701064735,"sunset":1701099179},"timezone":3600,"id":3181187,"name":"Calitri","cod":200}

Before:
image

Fix:
Piped output to sed to replace -0 with 0

After:
image

@shahnewaz-labib shahnewaz-labib marked this pull request as draft November 27, 2023 05:39
@shahnewaz-labib
Copy link
Author

Noticed the same bug in feels_like option. Applied the same fix.

Fixed #152

@shahnewaz-labib shahnewaz-labib marked this pull request as ready for review November 27, 2023 05:42
@Flapper01
Copy link

I happen to like the '-0' format. My home-made weather app indicates if the temperature is below zero. If its -0.5 it would be rounded to -1, but -0 means between 0 and -0.5, so its still below zero.

@shahnewaz-labib
Copy link
Author

@Flapper01 I'm curious, why is it necessary to know if it's between 0 and -0.5.
It seems odd to me to have '-0' displayed for a general user.

@im-n1
Copy link

im-n1 commented Jan 11, 2026

@fcambus do you even accept PR?

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

Successfully merging this pull request may close these issues.

3 participants