no message
This commit is contained in:
@@ -108,7 +108,8 @@ public function Update()
|
|||||||
foreach ($batteries as $idx => $b) {
|
foreach ($batteries as $idx => $b) {
|
||||||
$pBatW = max(0.0, (float)($b["powerbat"] ?? 0));
|
$pBatW = max(0.0, (float)($b["powerbat"] ?? 0));
|
||||||
$capKWh = max(0.0, (float)($b["capazity"] ?? 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 < 0) $socPct = 0;
|
||||||
if ($socPct > 100) $socPct = 100;
|
if ($socPct > 100) $socPct = 100;
|
||||||
@@ -178,6 +179,10 @@ public function Update()
|
|||||||
|
|
||||||
"EV_Charge_kW" => round($evChKW, 3),
|
"EV_Charge_kW" => round($evChKW, 3),
|
||||||
"EV_Discharge_kW" => round($evDisKW, 3),
|
"EV_Discharge_kW" => round($evDisKW, 3),
|
||||||
|
|
||||||
|
"SoC_varId" => $socVarId,
|
||||||
|
"SoC_pct" => round($socPct, 3),
|
||||||
|
"Stored_kWh"=> round($storedKWh, 3),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user