ladestrrom wird jetzt auch bei 1-Phasigem betrieb richtig angezeigt
This commit is contained in:
@@ -98,13 +98,32 @@ public function SetCurrentPower(int $power) {
|
||||
elseif (!$peak && !$solarladen) {
|
||||
// Wenn weder Peak noch Solarladen aktiv sind, setze Ladeleistung auf MaxLeistung
|
||||
SetValue($this->GetIDForIdent("Ladeleistung"), $this->ReadPropertyInteger("MaxLeistung"));
|
||||
SetValue($this->GetIDForIdent("Ladestrom"), $this->ReadPropertyInteger("MaxLeistung") / 400 / sqrt(3));
|
||||
|
||||
if(GetValue($this->GetIDForIdent("Lademodus"))==0){
|
||||
|
||||
SetValue($this->GetIDForIdent("Ladestrom"), $this->ReadPropertyInteger("MaxLeistung") / 240);
|
||||
|
||||
}elseif(GetValue($this->GetIDForIdent("Lademodus"))==1){
|
||||
|
||||
SetValue($this->GetIDForIdent("Ladestrom"), $this->ReadPropertyInteger("MaxLeistung") / 400 / sqrt(3));
|
||||
|
||||
}
|
||||
$this->sendPowerToStation($this->ReadPropertyInteger("MaxLeistung"));
|
||||
|
||||
} else {
|
||||
// Ansonsten setze Ladeleistung auf die aktuelle Leistungsvorgabe (CurrentPower)
|
||||
SetValue($this->GetIDForIdent("Ladeleistung"), $power);
|
||||
SetValue($this->GetIDForIdent("Ladestrom"), $power / 400 / sqrt(3));
|
||||
|
||||
if(GetValue($this->GetIDForIdent("Lademodus"))==0){
|
||||
|
||||
SetValue($this->GetIDForIdent("Ladestrom"), $power / 240);
|
||||
|
||||
}elseif(GetValue($this->GetIDForIdent("Lademodus"))==1){
|
||||
|
||||
SetValue($this->GetIDForIdent("Ladestrom"), $power / 400 / sqrt(3));
|
||||
|
||||
}
|
||||
|
||||
$this->sendPowerToStation($power);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user