mirror of
https://github.com/netbymatt/ws4kp.git
synced 2026-04-17 00:59:29 -07:00
almanac delivers data when disabled
This commit is contained in:
@@ -22,7 +22,7 @@ class Almanac extends WeatherDisplay {
|
||||
}
|
||||
|
||||
async getData(_weatherParameters) {
|
||||
if (!super.getData(_weatherParameters)) return;
|
||||
const superResponse = super.getData(_weatherParameters);
|
||||
const weatherParameters = _weatherParameters ?? this.weatherParameters;
|
||||
|
||||
// get sun/moon data
|
||||
@@ -33,11 +33,13 @@ class Almanac extends WeatherDisplay {
|
||||
sun,
|
||||
moon,
|
||||
};
|
||||
// update status
|
||||
this.setStatus(STATUS.loaded);
|
||||
|
||||
// share data
|
||||
this.getDataCallback();
|
||||
|
||||
if (!superResponse) return;
|
||||
|
||||
// update status
|
||||
this.setStatus(STATUS.loaded);
|
||||
}
|
||||
|
||||
calcSunMoonData(weatherParameters) {
|
||||
|
||||
@@ -16,7 +16,7 @@ const weatherParameters = {};
|
||||
|
||||
// auto refresh
|
||||
const AUTO_REFRESH_INTERVAL_MS = 500;
|
||||
const AUTO_REFRESH_TIME_MS = 6000; // 10 min.
|
||||
const AUTO_REFRESH_TIME_MS = 600000; // 10 min.
|
||||
let AutoRefreshIntervalId = null;
|
||||
let AutoRefreshCountMs = 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user