mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-06-27 03:39:55 +00:00
set weather updates on an interval
This commit is contained in:
parent
fc4e916a99
commit
0dee9c0bd9
@ -135,16 +135,17 @@ weather.updateWeatherForecast = function () {
|
||||
|
||||
weather.init = function () {
|
||||
|
||||
if (weather.params.lang === undefined) {
|
||||
weather.params.lang = weather.lang;
|
||||
if (this.params.lang === undefined) {
|
||||
this.params.lang = this.lang;
|
||||
}
|
||||
|
||||
if (weather.params.cnt === undefined) {
|
||||
weather.params.cnt = 5;
|
||||
if (this.params.cnt === undefined) {
|
||||
this.params.cnt = 5;
|
||||
}
|
||||
|
||||
weather.updateCurrentWeather();
|
||||
|
||||
weather.updateWeatherForecast();
|
||||
this.intervalId = setInterval(function () {
|
||||
this.updateCurrentWeather();
|
||||
this.updateWeatherForecast();
|
||||
}.bind(this), this.updateInterval);
|
||||
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user