From e759ac1e9dd37c0e624dd933e281cfebc094cb8f Mon Sep 17 00:00:00 2001 From: "belevo\\mh" Date: Wed, 11 Dec 2024 15:36:58 +0100 Subject: [PATCH] Codefehler --- Batterie/module.php | 62 ++++++++++++++++++++++----------------------- library.json | 2 +- 2 files changed, 32 insertions(+), 32 deletions(-) diff --git a/Batterie/module.php b/Batterie/module.php index 78ec167..8f3aaf2 100644 --- a/Batterie/module.php +++ b/Batterie/module.php @@ -164,42 +164,42 @@ class Batterie extends IPSModule - public function CheckIdle($power) - { - $lastpower = GetValue("Aktuelle_Leistung"); - if ($lastpower != GetValue("Aktuelle_Leistung")) { - $this->SetValue("Idle", false); - $this->SetValue( - "IdleCounter", - $this->ReadPropertyInteger("IdleCounterMax") - ); - } - // IdleCounter auslesen und verarbeiten - $idleCounter = $this->GetValue("IdleCounter"); - if ($idleCounter > 0) { - $this->SetValue("Idle", false); - $this->SetValue("IdleCounter", $idleCounter - 1); - } else { - $this->SetValue("Idle", true); - } - } - - public function ProcessIdleCounter() - { - // IdleCounter auslesen und verarbeiten - $idleCounter = $this->GetValue("IdleCounter"); - if ($idleCounter > 0) { - $this->SetValue("Idle", false); - $this->SetValue("IdleCounter", $idleCounter - 1); - } else { - $this->SetValue("Idle", true); - } - } } + private function CheckIdle($power) + { + $lastpower = GetValue("Aktuelle_Leistung"); + if ($lastpower != GetValue("Aktuelle_Leistung")) { + $this->SetValue("Idle", false); + $this->SetValue( + "IdleCounter", + $this->ReadPropertyInteger("IdleCounterMax") + ); + } + // IdleCounter auslesen und verarbeiten + $idleCounter = $this->GetValue("IdleCounter"); + if ($idleCounter > 0) { + $this->SetValue("Idle", false); + $this->SetValue("IdleCounter", $idleCounter - 1); + } else { + $this->SetValue("Idle", true); + } + } + + private function ProcessIdleCounter() + { + // IdleCounter auslesen und verarbeiten + $idleCounter = $this->GetValue("IdleCounter"); + if ($idleCounter > 0) { + $this->SetValue("Idle", false); + $this->SetValue("IdleCounter", $idleCounter - 1); + } else { + $this->SetValue("Idle", true); + } + } } ?> \ No newline at end of file diff --git a/library.json b/library.json index 604545f..ab0e3c6 100644 --- a/library.json +++ b/library.json @@ -6,7 +6,7 @@ "compatibility": { "version": "7.1" }, - "version": "0.177", + "version": "0.178", "build": 0, "date": 0 } \ No newline at end of file