diff --git a/Bat_EV_SDL/module.php b/Bat_EV_SDL/module.php index fc1a712..8404d0c 100644 --- a/Bat_EV_SDL/module.php +++ b/Bat_EV_SDL/module.php @@ -108,7 +108,8 @@ public function Update() foreach ($batteries as $idx => $b) { $pBatW = max(0.0, (float)($b["powerbat"] ?? 0)); $capKWh = max(0.0, (float)($b["capazity"] ?? 0)); - $socPct = (float)($b["soc"] ?? 0); + $socVarId = (int)($b["soc"] ?? 0); + $socPct = $this->ReadSocPercent($socVarId); if ($socPct < 0) $socPct = 0; if ($socPct > 100) $socPct = 100; @@ -178,6 +179,10 @@ public function Update() "EV_Charge_kW" => round($evChKW, 3), "EV_Discharge_kW" => round($evDisKW, 3), + + "SoC_varId" => $socVarId, + "SoC_pct" => round($socPct, 3), + "Stored_kWh"=> round($storedKWh, 3), ]; }