no message
This commit is contained in:
@@ -625,15 +625,18 @@ private function CalculateBatteryDistribution(float $pEvW, float $pSdlW): array
|
||||
}
|
||||
|
||||
|
||||
if(($pEvW + $pSdlW) === 0){
|
||||
$sumReq = (float)($pEvW + $pSdlW);
|
||||
|
||||
$this->SetValue("Aktuelle_Leistung_EV", $totalPower_ist/2);
|
||||
$this->SetValue("Aktuelle_Leistung_SDL", $totalPower_ist/2);
|
||||
if (!is_finite($sumReq) || abs($sumReq) < 0.01) {
|
||||
|
||||
}else{
|
||||
$this->SetValue("Aktuelle_Leistung_EV", $totalPower_ist / 2);
|
||||
$this->SetValue("Aktuelle_Leistung_SDL", $totalPower_ist / 2);
|
||||
|
||||
$this->SetValue("Aktuelle_Leistung_EV", $totalPower_ist/($pEvW + $pSdlW)*$pEvW);
|
||||
$this->SetValue("Aktuelle_Leistung_SDL", $totalPower_ist/($pEvW + $pSdlW)*$pSdlW);
|
||||
} else {
|
||||
|
||||
$this->SetValue("Aktuelle_Leistung_EV",($totalPower_ist / $sumReq) * $pEvW);
|
||||
|
||||
$this->SetValue("Aktuelle_Leistung_SDL",($totalPower_ist / $sumReq) * $pSdlW);
|
||||
}
|
||||
|
||||
return $finalOutput;
|
||||
|
||||
@@ -191,10 +191,6 @@ private function GeneratePowerSteps($additionalValue)
|
||||
$array_powersteps = array_values(array_unique($array_powersteps));
|
||||
sort($array_powersteps, SORT_NUMERIC);
|
||||
|
||||
IPS_LogMessage("Batterie", "RAW Max=" . $maxleistung_raw . " RAW Nach=" . $nachladen_raw . " additional=" . $additionalValue);
|
||||
|
||||
IPS_LogMessage("Batterie", "Rounded Max=" . $maxleistung . " Min=" . $minleistung);
|
||||
|
||||
return $array_powersteps;
|
||||
} // Ende Array Steps
|
||||
|
||||
|
||||
Reference in New Issue
Block a user