diff --git a/MQTTBatterySDL/module.php b/MQTTBatterySDL/module.php index 1111838..094c4cb 100644 --- a/MQTTBatterySDL/module.php +++ b/MQTTBatterySDL/module.php @@ -142,11 +142,12 @@ class MQTTBatterySDL extends IPSModule $dischargePower = $this->ReadPropertyInteger('DischargePower'); - + $minSoC = GetValue($this->GetIDForIdent('MinSoC')); + $maxSoC = GetValue($this->GetIDForIdent('MaxSoC')); // ------------------------------------------------- // Grenz Soc's // ------------------------------------------------- - if (($soc <= 4 || $soc >= 95) && $strategy != "restore") { + if (($soc <= $minSoC || $soc >= $maxSoC) && $strategy != "restore") { SetValue( $reqActionID,