Fix yr weather direction#3020
Fix yr weather direction#3020rejas merged 3 commits intoMagicMirrorOrg:developfrom MagMar94:bugfix/fix-yr-weather-direction
Conversation
The weather object expects the wind from direction, not the wind to direction.
This will make it more intuitive for other developers to understand what direction they should provide to the object.
Codecov Report
@@ Coverage Diff @@
## develop #3020 +/- ##
===========================================
+ Coverage 21.76% 21.84% +0.07%
===========================================
Files 52 52
Lines 11441 11441
===========================================
+ Hits 2490 2499 +9
+ Misses 8951 8942 -9
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
|
Will have a look at this later when home (and if there are tests for this) Have you checked if every provider handles wind direction the same? |
No, but I only changed the variable assignment in the Yr-provider. I renamed the variable for everyone to make It easier to understand what value the weather module expects. If a provider returns the wrong value it will result in wrong cardinal directions. I missed this when I implemented the provider, because I matched the arrow ( |
Fixes so the Yr weather direction is not inverted. This error was reported in the community.
I misunderstood when developing the module because of the wind direction arrow was pointing opposite to the arrow displayed on Yr.no. I renamed the variable to help other developers in the future.