Skip to content

Commit

Permalink
Fixed wind speed units for Open-Meteo Weather Provider (#3054)
Browse files Browse the repository at this point in the history
Resolved technical debt for
[2964](#2964):

- Set wind speed unit to m/s
- Rename parameter `past_days` to `pastDays` to be consistent with all
configs
  • Loading branch information
angeldeejay authored Mar 1, 2023
1 parent 1b2785c commit 23ee155
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ _This release is scheduled to be released on 2023-04-01._
- Cleanup jest coverage for patches
- Update `stylelint` dependencies, switch to `stylelint-config-standard` and handle `stylelint` issues
- Convert lots of callbacks to async/await
- Fixed Open-Meteo wind speed units

### Fixed

Expand Down
6 changes: 3 additions & 3 deletions modules/default/weather/providers/openmeteo.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ WeatherProvider.register("openmeteo", {
apiBase: OPEN_METEO_BASE,
lat: 0,
lon: 0,
past_days: 0,
pastDays: 0,
type: "current"
},

Expand Down Expand Up @@ -227,12 +227,12 @@ WeatherProvider.register("openmeteo", {
longitude: this.config.lon,
timeformat: "unixtime",
timezone: "auto",
past_days: this.config.past_days ?? 0,
past_days: this.config.pastDays ?? 0,
daily: this.dailyParams,
hourly: this.hourlyParams,
// Fixed units as metric
temperature_unit: "celsius",
windspeed_unit: "kmh",
windspeed_unit: "ms",
precipitation_unit: "mm"
};

Expand Down

0 comments on commit 23ee155

Please sign in to comment.