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

New Weather Provider (Qweather.com) #68

Merged
merged 10 commits into from
Apr 14, 2024
Merged

Conversation

Livins1
Copy link
Contributor

@Livins1 Livins1 commented Apr 9, 2024

This provider uses the free subscription of Qweather.com and needs an API key.

First, only 24-hour hourly weather data can be provided. which means the hourly graph (e.g. temp, uv, aqi ...) can only work properly for the current day.
Second, this is the only provider that can provide as much data as we need as possible in mainland China when it's free.

And I don't think we can merge data from multiple providers to this provider:
regional specificity: network vpn blahblahblah...
different provider means different API keys (there is no public(gov) service of weather in the China network), I don't think this is acceptable when I using just a weather app, because of that I need to input more than one API key.

Last, i don't know if this pull request is helpful.

There is also a problem need to be fix if we use this provider because of the lack of the hourly weather data:
图片

@CLAassistant
Copy link

CLAassistant commented Apr 9, 2024

CLA assistant check
All committers have signed the CLA.

@rocksdanister
Copy link
Owner

rocksdanister commented Apr 10, 2024

Good work.. I Took a quick look and here is what I think:

  1. Graph being empty (template) for future days is fine but not sure why the icons appeared here? it should not as long as Hourly arrays are empty.

image

  1. Remove the changes in OpenMeteoWeatherClient.cs.
  2. For the weather provider name maybe we can say something like "Qweather (Chinese/China)" to let people know its best for Chinese region.
  3. Looking at the weather icon code and OpenWeatherMapCodeToWmo function its not mapping correctly ?
    For example:
    • In the docs 350 is Shower (as per translation) but Thunderstorm in the function.
    • In the docs 901 is Cold but Overcast here (since its missing on the WMO side this is fine for now.)
    • There is no 200 code in the docs.

The WMO code is important and care needs to be taken because it is used for all the effects and other core features.

@Livins1
Copy link
Contributor Author

Livins1 commented Apr 12, 2024

  1. Check the change in src/Drizzle.UI.UWP/UserControls/DailyGraph.xaml.cs to see how I avoid these icons.but I don't know if this is the right way.
  2. done
  3. Qweather(CN) should be fine.
  4. Reworked.

@rocksdanister
Copy link
Owner

Revert the changes in DailyGraph.xaml.cs.. that does not seem right, I'll take a look at it later.

Rest looks fine but is the CLA a problem? noticed you haven't signed it.

@rocksdanister rocksdanister merged commit c463924 into rocksdanister:main Apr 14, 2024
1 check passed
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