no message

This commit is contained in:
2025-04-14 13:50:59 +02:00
parent 1cbae2ce7d
commit 22d5d8d425

View File

@@ -67,8 +67,7 @@ class Verbraucher_extern extends IPSModule
}
private function berechneKombinationen(array $verbraucherListe)
{
private function berechneKombinationen(array $verbraucherListe){
$kombinationen = [];
foreach ($verbraucherListe as $verbraucher) {
@@ -89,7 +88,7 @@ class Verbraucher_extern extends IPSModule
}
private function find($target, $values, $current, &$result) {
private function find($target, $values, $current, &$result) {
if ($target == 0) {
$result[] = $current;
return;
@@ -99,7 +98,7 @@ class Verbraucher_extern extends IPSModule
}
for ($i = 0; $i < count($values); $i++) {
$newValues = array_slice($values, $i + 1);
find($target - $values[$i], $newValues, array_merge($current, [$values[$i]]), $result);
$this->find($target - $values[$i], $newValues, array_merge($current, [$values[$i]]), $result);
}
}
@@ -129,9 +128,10 @@ class Verbraucher_extern extends IPSModule
public function SetAktuelle_Leistung(float $power) {
$this->SetValue("Bezogene_Energie", ($this->GetValue("Bezogene_Energie") + ($this->GetValue("Aktuelle_Leistung")*($this->ReadPropertyInteger("Interval")/3600))));
$this->CheckIdle($power);
$verbraucherListe = json_decode($this->ReadPropertyString("Verbraucher_Liste"), true);
$this->berechneInverseKombinationen();
$this->SetValue("Leistung_Delta", GetValue($this->ReadPropertyInteger("delta_power")));
}