From 23ee155ded54c2fc848c1079df63019c367303ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Vanegas=20Jim=C3=A9nez?= <142350+angeldeejay@users.noreply.github.com> Date: Wed, 1 Mar 2023 03:38:38 -0500 Subject: [PATCH] Fixed wind speed units for Open-Meteo Weather Provider (#3054) Resolved technical debt for [2964](https://github.com/MichMich/MagicMirror/pull/2964): - Set wind speed unit to m/s - Rename parameter `past_days` to `pastDays` to be consistent with all configs --- CHANGELOG.md | 1 + modules/default/weather/providers/openmeteo.js | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9ff5c06c..162edb5a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/modules/default/weather/providers/openmeteo.js b/modules/default/weather/providers/openmeteo.js index 3676b6e2..e489d927 100644 --- a/modules/default/weather/providers/openmeteo.js +++ b/modules/default/weather/providers/openmeteo.js @@ -24,7 +24,7 @@ WeatherProvider.register("openmeteo", { apiBase: OPEN_METEO_BASE, lat: 0, lon: 0, - past_days: 0, + pastDays: 0, type: "current" }, @@ -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" };