From bf79f30e76d8871193d7d91ec325f4759ad7d8c9 Mon Sep 17 00:00:00 2001 From: "belevo\\mh" Date: Tue, 20 Jan 2026 09:29:17 +0100 Subject: [PATCH] no message --- PV_Forecast/module.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/PV_Forecast/module.php b/PV_Forecast/module.php index a2ad504..3293809 100644 --- a/PV_Forecast/module.php +++ b/PV_Forecast/module.php @@ -24,10 +24,13 @@ class PV_Forecast extends IPSModule { parent::ApplyChanges(); + // HTML-SDK / Tile Visualization aktivieren + $this->SetVisualizationType(1); + $mins = max(1, (int)$this->ReadPropertyInteger("RefreshMinutes")); $this->SetTimerInterval("UpdateForecastTimer", $mins * 60 * 1000); - // Hook registrieren (hier ist es zuverlässig) + // Hook besser hier registrieren $this->RegisterHook("/hook/solcastcompare"); } @@ -180,15 +183,14 @@ class PV_Forecast extends IPSModule // -------- Visualisierung / Hook -------- - public function GetVisualization() + public function GetVisualizationTile(): string { - // Forecast ggf. initial laden, wenn noch nichts da + // Forecast ggf. initial laden if ($this->GetBuffer("ForecastRaw") === "") { $this->UpdateForecast(); } - $htmlPath = __DIR__ . "/module.html"; - $html = file_get_contents($htmlPath); + $html = file_get_contents(__DIR__ . "/module.html"); // Platzhalter ersetzen $html = str_replace("{{INSTANCE_ID}}", (string)$this->InstanceID, $html);