From a7ae6b9a57b1921e8f56d68b14afa34c0a60eb48 Mon Sep 17 00:00:00 2001 From: "belevo\\mh" Date: Thu, 18 Jun 2026 13:28:05 +0200 Subject: [PATCH] no message --- Verbraucher_1_Stufig/module.php | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/Verbraucher_1_Stufig/module.php b/Verbraucher_1_Stufig/module.php index de78b08..5838329 100644 --- a/Verbraucher_1_Stufig/module.php +++ b/Verbraucher_1_Stufig/module.php @@ -89,6 +89,13 @@ class Verbraucher_1_Stufig extends IPSModule $zeitZwischenZustandswechseln = $this->ReadPropertyInteger( "Zeit_Zwischen_Zustandswechseln" ); + + if ($zeitZwischenZustandswechseln <= 0) { + $this->SetTimerInterval("ZustandswechselTimer", 0); + $this->SetValue("IsTimerActive", false); + return; + } + $this->SetTimerInterval( "ZustandswechselTimer", $zeitZwischenZustandswechseln * 60000 @@ -161,16 +168,21 @@ class Verbraucher_1_Stufig extends IPSModule $this->SetValue("IstNacht", $NeuesIstNacht); - if ($Peak) { - $this->SetValue("PowerSteps", json_encode([0])); - return; - } $DailyOnTime = $this->GetValue("DailyOnTime"); $Mindestlaufzeit = $this->ReadPropertyInteger("Mindesttlaufzeit") * 60 * 12; + if ( + $Peak && + $this->ReadPropertyInteger("Mindesttlaufzeit") <= 0 && + $this->ReadPropertyInteger("Zeit_Zwischen_Zustandswechseln") <= 0 + ) { + $this->SetValue("PowerSteps", json_encode([0])); + return; + } + // Überprüfen, ob der Timer aktiv ist if ($this->GetValue("IsTimerActive")) { // Timer ist aktiv, PowerSteps setzen