diff --git a/Batterie/module.php b/Batterie/module.php index 0d25c24..4f73d8b 100644 --- a/Batterie/module.php +++ b/Batterie/module.php @@ -31,6 +31,7 @@ class Batterie extends IPSModule $this->RegisterVariableBoolean("Is_Peak_Shaving", "Is_Peak_Shaving"); $this->RegisterVariableInteger("Leistung_Delta", "Leistung_Delta", "", 0); + $this->RegisterVariableBoolean("Hysterese", "Hysterese","",false); @@ -376,10 +377,17 @@ public function RequestAction($Ident, $Value) return $this->SetValue("PowerSteps", json_encode($dummy_array)); } + $netzbezug = GetValue($this->ReadPropertyInteger("Netzbezug")); + /* if (abs($netzbezug) > $maxentladeleistung) { //$netzbezug = $maxentladeleistung * (-1); $netzbezug = $netzbezug * (-1); + }*/ + + + if ($Peak && $netzbezug > 0) { + $netzbezug = -min($netzbezug, $maxentladeleistung); } if($batterieladezustand>(5+$aufdasnachladen)){