mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-08-21 12:55:22 +00:00
fixed config parameter typo
This commit is contained in:
@@ -66,7 +66,7 @@ WeatherProvider.register("openweathermap", {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.setFetchedLocation(`(${data.lat},${data.lon})`);
|
this.setFetchedLocation(`${data.lat},${data.lon}`);
|
||||||
|
|
||||||
const wData = this.generateWeatherObjectsFromOnecall(data);
|
const wData = this.generateWeatherObjectsFromOnecall(data);
|
||||||
this.setWeatherData(wData);
|
this.setWeatherData(wData);
|
||||||
|
@@ -155,14 +155,12 @@ Module.register("weather", {
|
|||||||
}
|
}
|
||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
if (this.config.type === "wDataCurrent"
|
if (this.config.type === "forecast") {
|
||||||
|| this.config.type === "wDataHourly"
|
|
||||||
|| this.config.type === "wDataDaily") {
|
|
||||||
this.weatherProvider.fetchWeatherData();
|
|
||||||
} else if (this.config.type === "forecast") {
|
|
||||||
this.weatherProvider.fetchWeatherForecast();
|
this.weatherProvider.fetchWeatherForecast();
|
||||||
} else {
|
} else if (this.config.type === "current") {
|
||||||
this.weatherProvider.fetchCurrentWeather();
|
this.weatherProvider.fetchCurrentWeather();
|
||||||
|
} else {
|
||||||
|
this.weatherProvider.fetchWeatherData();
|
||||||
}
|
}
|
||||||
}, nextLoad);
|
}, nextLoad);
|
||||||
},
|
},
|
||||||
@@ -271,7 +269,7 @@ Module.register("weather", {
|
|||||||
this.nunjucksEnvironment().addFilter(
|
this.nunjucksEnvironment().addFilter(
|
||||||
"calcNumEntries",
|
"calcNumEntries",
|
||||||
function (dataArray) {
|
function (dataArray) {
|
||||||
return Math.min(dataArray.length, this.config.maxNumberOfEntries);
|
return Math.min(dataArray.length, this.config.maxEntries);
|
||||||
}.bind(this)
|
}.bind(this)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user