no message

This commit is contained in:
belevo\mh
2025-10-16 11:39:26 +02:00
parent ba85ee0dd5
commit 211606e046

View File

@@ -132,18 +132,18 @@ public function RequestAction($Ident, $Value)
}
}
public function SetAktuelle_Leistung(int $y)
public function SetAktuelle_Leistung(int $power)
{
$power = (-1)*$y;
$y = (-1)*$power;
if ($power < 0) {
if ($y < 0) {
// Laden
$uVarID = $this->ReadPropertyInteger("Batteriespannung");
if ($uVarID > 0 && IPS_VariableExists($uVarID)) {
$U = GetValue($uVarID);
if ($U > 0) {
$lade_strom = abs($power) / $U;
$lade_strom = abs($y) / $U;
} else {
$lade_strom = 0;
}
@@ -155,14 +155,14 @@ public function RequestAction($Ident, $Value)
$this->SetValue("Entladestrom", 0);
$this->SetValue("Batteriespannung_laden_entladen", 56);
} elseif ($power > 0) {
} elseif ($y > 0) {
// Entladen
$uVarID = $this->ReadPropertyInteger("Batteriespannung");
if ($uVarID > 0 && IPS_VariableExists($uVarID)) {
$U = GetValue($uVarID);
if ($U > 0) {
$entlade_strom = $power / $U;
$entlade_strom = $y / $U;
} else {
$entlade_strom = 0;
}