mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-08-23 13:24:06 +00:00
Fix yr weather direction (#3020)
Fixes so the Yr weather direction is not inverted. This error was [reported in the community](https://forum.magicmirror.builders/topic/17561/wind-direction-180-degrees-twisted-at-yr). 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. Co-authored-by: Magnus Marthinsen <magmar@online.no> Co-authored-by: veeck <michael@veeck.de>
This commit is contained in:
@@ -180,7 +180,7 @@ WeatherProvider.register("weathergov", {
|
||||
weather.windSpeed = forecast.windSpeed.slice(0, forecast.windSpeed.search(" "));
|
||||
}
|
||||
weather.windSpeed = WeatherUtils.convertWindToMs(weather.windSpeed);
|
||||
weather.windDirection = forecast.windDirection;
|
||||
weather.windFromDirection = forecast.windDirection;
|
||||
weather.temperature = forecast.temperature;
|
||||
// use the forecast isDayTime attribute to help build the weatherType label
|
||||
weather.weatherType = this.convertWeatherType(forecast.shortForecast, forecast.isDaytime);
|
||||
@@ -206,7 +206,7 @@ WeatherProvider.register("weathergov", {
|
||||
currentWeather.date = moment(currentWeatherData.timestamp);
|
||||
currentWeather.temperature = currentWeatherData.temperature.value;
|
||||
currentWeather.windSpeed = WeatherUtils.convertWindToMs(currentWeatherData.windSpeed.value);
|
||||
currentWeather.windDirection = currentWeatherData.windDirection.value;
|
||||
currentWeather.windFromDirection = currentWeatherData.windDirection.value;
|
||||
currentWeather.minTemperature = currentWeatherData.minTemperatureLast24Hours.value;
|
||||
currentWeather.maxTemperature = currentWeatherData.maxTemperatureLast24Hours.value;
|
||||
currentWeather.humidity = Math.round(currentWeatherData.relativeHumidity.value);
|
||||
|
Reference in New Issue
Block a user