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

wrong temperature in weather widget #328

Open
azinsharaf opened this issue Nov 14, 2022 · 9 comments
Open

wrong temperature in weather widget #328

azinsharaf opened this issue Nov 14, 2022 · 9 comments
Labels
bug Something isn't working

Comments

@azinsharaf
Copy link

similar to issue #150, the weather widget doesn't show the correct temperature. Have you got it fixed yet?

@Jean-Tinland
Copy link
Owner

I'll look into it soon :)

@Jean-Tinland Jean-Tinland added the bug Something isn't working label Nov 30, 2022
@mdwitr0
Copy link
Contributor

mdwitr0 commented Dec 10, 2022

I think it has to do with how often the widget updates. In the settings you can set your own interval and then the data will be more accurate.
This can be done in settings)

изображение

@azinsharaf, please let me know if this doesn't help.

@azinsharaf
Copy link
Author

hmm, let me check it multiple times and compare the temps. The difference was a lot when i checked it before.
With 5000 ms interval, i get 56 F in simple bar and 55 F in wttr.in. Not exactly the same.

weather report: Oakland, CA

                Overcast
       .--.     +55(53) °F     
    .-(    ).   ↗ 8 mph        
   (___.__)__)  6 mi           
                0.0 in   

@azinsharaf
Copy link
Author

I tested it again after 5 hours. The interval is 5 seconds but the temperature difference is 3 F.

@mdwitr0
Copy link
Contributor

mdwitr0 commented Dec 12, 2022

I look at the widget, but so far I see that the api is being polled stably. Response from weather api is correct.

I made a mock that generated random weather every time and set the update interval to 1000ms. The weather changed right.

Tell me, do you have the actual code in the widget from the master branch? And tell me, are you having problems accessing wttr.in api?

@azinsharaf
Copy link
Author

yes i am on the master branch.

❯ pwd
/Users/azin/Library/Application Support/Übersicht/widgets/simple-bar

❯ git status
On branch master
Your branch is up to date with 'origin/master'.

nothing to commit, working tree clean

this is the screenshots from the widget and api:

image

image

@Jean-Tinland
Copy link
Owner

Thank you @azinsharaf for these details and @mdwitr0 for your help!

I've just pushed on master in f0845dc some changes in the weather widget's getter function because it was a bit messy but I don't think this will solve your issue. Please let me know if you see any improvements anyway.

As of now I couldn't reproduce your issue as the data displayed in the widget was matching the output of wttr.in in the browser.

I'll try to look into it again soon hoping to correct this issue. :)

@azinsharaf
Copy link
Author

Thanks @Jean-Tinland
The new commit has the same issue. I understand you can not reproduce it but the widget shows me 49 F (for Oakland city) but the API shows "temp_F": "50"
Which key are you using for temerature?

image

image

@Jean-Tinland
Copy link
Owner

Hi @azinsharaf sorry for my really late response, I'm using either temp_C or temp_F depending on your settings.

I haven't been able to fix this issue for now but I think It has something to do with the weather widget being stuck to an anterior state and not taking new data in account.

I'll keep digging as I have been working on this project again recently :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants