From cdd1853369f90e7b7dbb6a82484331399e108aa4 Mon Sep 17 00:00:00 2001 From: Robby Griffin Date: Thu, 11 Mar 2021 12:48:41 -0500 Subject: [PATCH] Fix weather module openweathermap not loading if lat and lon set without onecall. Lat and Lon take precedence over LocationID and Location. --- CHANGELOG.md | 1 + modules/default/weather/providers/openweathermap.js | 2 ++ 2 files changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1f7a96e4..b4c97312 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -52,6 +52,7 @@ _This release is scheduled to be released on 2021-04-01._ - Fix socket.io backward compatibility with socket v2 clients - 3rd party module language loading if language is English - Fix e2e tests after spectron update +- Fix weather module openweathermap not loading if lat and lon set without onecall. ## [2.14.0] - 2021-01-01 diff --git a/modules/default/weather/providers/openweathermap.js b/modules/default/weather/providers/openweathermap.js index c71dbd87..2d0645fc 100755 --- a/modules/default/weather/providers/openweathermap.js +++ b/modules/default/weather/providers/openweathermap.js @@ -465,6 +465,8 @@ WeatherProvider.register("openweathermap", { } else { params += "&exclude=minutely"; } + } else if (this.config.lat && this.config.lon) { + params += "lat=" + this.config.lat + "&lon=" + this.config.lon; } else if (this.config.locationID) { params += "id=" + this.config.locationID; } else if (this.config.location) {