Fix weathergov provider hourly weather forecast (#3011)

Hourly forecast wasnt converted properly during the last release cycle,
one fix and two cleanups were necessary.

Fixes #3010

Co-authored-by: veeck <michael@veeck.de>
This commit is contained in:
Veeck 2023-01-16 21:52:11 +01:00 committed by GitHub
parent 8d9f132666
commit c714399b4d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View File

@ -29,6 +29,7 @@ _This release is scheduled to be released on 2023-04-01._
### Fixed
- Fix wrong day labels in envcanada forecast (#2987)
- Fix weathergov provider hourly forecast (#3008)
## [2.22.0] - 2023-01-01

View File

@ -179,9 +179,9 @@ WeatherProvider.register("weathergov", {
} else {
weather.windSpeed = forecast.windSpeed.slice(0, forecast.windSpeed.search(" "));
}
weather.windDirection = this.convertWindDirection(forecast.windDirection);
weather.windSpeed = WeatherUtils.convertWindToMs(weather.windSpeed);
weather.windDirection = forecast.windDirection;
weather.temperature = forecast.temperature;
weather.tempUnits = forecast.temperatureUnit;
// use the forecast isDayTime attribute to help build the weatherType label
weather.weatherType = this.convertWeatherType(forecast.shortForecast, forecast.isDaytime);