diff --git a/Verbraucher_extern/module.php b/Verbraucher_extern/module.php index 722f475..9ca487e 100644 --- a/Verbraucher_extern/module.php +++ b/Verbraucher_extern/module.php @@ -77,11 +77,10 @@ class Verbraucher_extern extends IPSModule if ($verbraucher['Read_Var'] == 1) { IPS_LogMessage("externer verb 2", print_r($kombinationen)); - - $tempListe = $kombinationen; - foreach ($tempListe as &$wert) { - $wert += $verbraucher['P_Nenn']; - } + $tempListe = []; + foreach ($kombinationen as $wert) { + $tempListe[] = $wert + $verbraucher['P_Nenn']; + } unset($wert); $kombinationen = array_merge($kombinationen, $tempListe); IPS_LogMessage("externer verb 3", print_r($kombinationen)); @@ -107,7 +106,7 @@ class Verbraucher_extern extends IPSModule foreach ($verbraucherListe as $verbraucher) { $writeVarID = $verbraucher['Write_Var']; $pNenn = $verbraucher['P_Nenn']; - $this->SetValue($writeVarID, 4); + SetValue($writeVarID, 4); } $this->SetValue("Leistung_Delta", GetValue($this->ReadPropertyInteger("delta_power"))); }