no message

This commit is contained in:
belevo\mh
2026-04-29 08:30:49 +02:00
parent df7d776f8e
commit 00b3c7b723
+16
View File
@@ -89,6 +89,22 @@ class Bat_EV_SDL_V3_Beta extends IPSModule
$Esdl_kWh = 0.0;
}
// SDL-Gesamtkapazität aus Cache vorab berechnen
$SDL_kWh_ges_cfg = 0.0;
foreach ($cache["bats"] as $bc) {
$SDL_kWh_ges_cfg += (float)($bc["SDL_kWh_total"] ?? 0.0);
}
// Beim allerersten Lauf NICHT mit 0 % starten,
// sondern virtuell auf Mitte setzen.
// Bei symmetrischem SDL-Fenster ist das genau 50 %.
/*
if ($this->GetBufferSafe("Int_Init_SDL") !== "1") {
$Esdl_kWh = $SDL_kWh_ges_cfg * 0.5;
$this->SetBuffer("Int_Init_SDL", "1");
}*/
$dtSec = $now - $lastTs;
if ($dtSec < 0.0) $dtSec = 0.0;
if ($dtSec > 10.0) $dtSec = 10.0; // optional: Kappe bei Aussetzern