mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-08-23 13:24:06 +00:00
Updated weather to get a locationID
This commit is contained in:
@@ -12,6 +12,7 @@ Module.register("weatherforecast",{
|
||||
// Default module config.
|
||||
defaults: {
|
||||
location: "",
|
||||
locationID: "",
|
||||
appid: "",
|
||||
units: config.units,
|
||||
maxNumberOfDays: 7,
|
||||
@@ -195,7 +196,11 @@ Module.register("weatherforecast",{
|
||||
*/
|
||||
getParams: function() {
|
||||
var params = "?";
|
||||
params += "q=" + this.config.location;
|
||||
if(this.config.locationID !== "") {
|
||||
params += "id=" + this.config.locationID;
|
||||
} else {
|
||||
params += "q=" + this.config.location;
|
||||
}
|
||||
params += "&units=" + this.config.units;
|
||||
params += "&lang=" + this.config.lang;
|
||||
/*
|
||||
|
Reference in New Issue
Block a user