This commit is contained in:
Darius
2026-02-05 23:34:53 +01:00
parent 07719bbc1f
commit 105fb3aecb

View File

@@ -7,7 +7,7 @@ import {
TidalGetCurrent,
type ServiceResult,
} from "@dpu/shared";
import { logWarning } from "@dpu/shared/dist/logger.js";
import { logInfo, logWarning } from "@dpu/shared/dist/logger.js";
import { HomeAssistantService } from "../homeassistant/service";
import { TidalService } from "../tidal/service";
@@ -137,12 +137,15 @@ export class HomepageService extends BaseService<null> {
}
startPolling(): void {
logInfo("Polling started");
this.pollingInterval = setInterval(() => {
logInfo("Polling now");
this.getFullInformation();
}, 30000);
}
stopPolling(): void {
logInfo("Polling ended");
if (this.pollingInterval) {
clearInterval(this.pollingInterval);
}