-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Use metric units internally in all weatherproviders #2849
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #2849 +/- ##
===========================================
- Coverage 65.28% 65.21% -0.08%
===========================================
Files 14 14
Lines 726 733 +7
===========================================
+ Hits 474 478 +4
- Misses 252 255 +3
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
I love this PR. This is so much cleaner. Thanks! Let me know when it's ready to be merged. |
I think this will not be ready for the next release, mainly due to not being sure if there arent any bugs in it. Would be nice to have people test this PR with their repsective providers... |
No worries. It can easily wait till next release. 👍🏻 |
Verified that the SMHI provider works as expected using the branch from this pull request. Great job. |
This is awesome, and truly so much cleaner! 👍 Might I suggest to change the As a pilot, I'd love support for P.S: found this PR while researching the integration of UV Index, but I'll hold off on that until this is merged. Great work! |
Since darksky is bought by apple and will stop in 2023 they dont allow new signups for their webapi anymore. Can anyone of the original developers check out the code (and maybe check out #2899 too if that is a proble there too?) Also, probably have to deprecate the provider sooner or later :-) Not sure if the Apple WeatherKit is something to follow up since there isnt a real free plan as far as I can see (https://developer.apple.com/weatherkit/get-started/) So, regarding checking darksky out, I look at @nhubbard @fewieden and @buxxi since they might have api access still :-) |
I have never tried the darksky provider, so I can't help with that. |
so I hopefully fixed all providers with respect to temperature and wind. only with weatherflow I had to blindly "fix" it since I dont have a station for that api. maybe the original author @10bias can test this? next I will take a look at the other open points. still, any testing is welcome :-) |
I am not an expert in wind stuff, so how would the windunits look like at the end? |
if you've got m/s, it's comparatively simple. https://www.convert-measurement-units.com/convert+Meters+per+second+to+Beaufort.php is a great reference :) I guess we'd love km/h, Beaufort, and knots. (if I get to it, I can write that code, but not today) |
So I worked a little tonight at the windunits on my branch:
Slowly getting to the finish line with this PR ;-) |
db97ef8
to
a554dcb
Compare
68f0e02
to
6de8769
Compare
also convert wind to m/s remove dead code
fix some typos too
also convert km/h to m/s for wind value
especially move sunset/sunrise to e2e tests
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good!
Not sure if the other two will review here, so feel free to merge @khassel :-) |
## [2.22.0] - 2023-01-01 Thanks to: @angeldeejay, @buxxi, @dariom, @dWoolridge, @KristjanESPERANTO, @MagMar94, @naveensrinivasan, @retroflex, @SkySails and @tom. Special thanks to @khassel, @rejas and @sdetweil for taking over most (if not all) of the work on this release as project collaborators. This version would not be there without their effort. Thank you! ### Added - Added test for remoteFile option in compliments module - Added hourlyWeather functionality to Weather.gov weather provider - Removed weatherEndpoint definition from weathergov.js (not used) - Added css class names "today" and "tomorrow" for default calendar - Added Collaboration.md - Added new github action for dependency review (#2862) - Added a WeatherProvider for Open-Meteo - Added Yr as a weather provider - Added config options "ignoreXOriginHeader" and "ignoreContentSecurityPolicy" ### Removed - Removed usage of internal fetch function of node until it is more stable ### Updated - Cleaned up test directory (#2937) and jest config (#2959) - Wait for all modules to start before declaring the system ready (#2487) - Updated e2e tests (moved `done()` in helper functions) and use es6 syntax in all tests - Updated da translation - Rework weather module - Make sure smhi provider api only gets a maximum of 6 digits coordinates (#2955) - Use fetch instead of XMLHttpRequest in weatherprovider (#2935) - Reworked how weatherproviders handle units (#2849) - Use unix() method for parsing times, fix suntimes on the way (#2950) - Refactor conversion functions into utils class (#2958) - The `cors`-method in `server.js` now supports sending and recieving HTTP headers - Replace `…` by `…` - Cleanup compliments module - Updated dependencies including electron to v22 (#2903) ### Fixed - Correctly show apparent temperature in SMHI weather provider - Ensure updatenotification module isn't shown when local is _ahead_ of remote - Handle node_helper errors during startup (#2944) - Possibility to change FontAwesome class in calendar, so icons like `fab fa-facebook-square` works. - Fix cors problems with newsfeed articles (as far as possible), allow disabling cors per feed with option `useCorsProxy: false` (#2840) - Tests not waiting for the application to start and stop before starting the next test - Fix electron tests failing sometimes in github workflow - Fixed gap in clock module when displayed on the left side with displayType=digital - Fixed playwright issue by upgrading to v1.29.1 (#2969) Signed-off-by: naveen <[email protected]> Co-authored-by: Karsten Hassel <[email protected]> Co-authored-by: Malte Hallström <[email protected]> Co-authored-by: Veeck <[email protected]> Co-authored-by: veeck <[email protected]> Co-authored-by: dWoolridge <[email protected]> Co-authored-by: Johan <[email protected]> Co-authored-by: Dario Mratovich <[email protected]> Co-authored-by: Dario Mratovich <[email protected]> Co-authored-by: Magnus <[email protected]> Co-authored-by: Naveen <[email protected]> Co-authored-by: buxxi <[email protected]> Co-authored-by: Thomas Hirschberger <[email protected]> Co-authored-by: Kristjan ESPERANTO <[email protected]> Co-authored-by: Andrés Vanegas Jiménez <[email protected]>
So finally I think this refactorin is ready to be reviewed :-)
DONE:
Checked providers:
TODO in different tickets: