From c9eb0693aafb1eb794986e1f36a33e4a427d2f77 Mon Sep 17 00:00:00 2001 From: "belevo\\mh" Date: Wed, 3 Dec 2025 10:10:22 +0100 Subject: [PATCH] no message --- Batterie_test/module.php | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/Batterie_test/module.php b/Batterie_test/module.php index 1c1e4ab..0107329 100644 --- a/Batterie_test/module.php +++ b/Batterie_test/module.php @@ -62,19 +62,25 @@ class Batterie_test extends IPSModule $this->SetValue("Batteriemanagement_Variabel", $batterieManagement); $this->SetTimerInterval("Timer_Do_UserCalc_Battery",$this->ReadPropertyInteger("Interval")*1000); + $batterietyp = $this->ReadPropertyInteger("Batterietyp"); + switch ($batterietyp) { case 1: // z.B. LiFePo4 - $this->RegisterVariableFloat("Goodwe_EntLadeleistung","Goodwe_EntLadeleistung", "",0); + $this->MaintainVariable("Goodwe_EntLadeleistung", "Goodwe_EntLadeleistung", vtFloat, "", 10, true); + $this->MaintainVariable("BattTyp2_Wert", "BattTyp2_Wert", vtFloat, "", 11, false); + $this->MaintainVariable("BattTyp3_Wert", "BattTyp3_Wert", vtFloat, "", 12, false); break; case 2: // z.B. Blei-Gel - - $this->RegisterVariableFloat("2","2", "",0); + $this->MaintainVariable("Goodwe_EntLadeleistung", "Goodwe_EntLadeleistung", vtFloat, "", 10, false); + $this->MaintainVariable("BattTyp2_Wert", "BattTyp2_Wert", vtFloat, "", 11, false); + $this->MaintainVariable("BattTyp3_Wert", "BattTyp3_Wert", vtFloat, "", 12, true); + break; break; case 2: - $this->RegisterVariableFloat("3","3", "",0); + $this->MaintainVariable("BattTyp3_Wert","BattTyp3_Wert", "",0); break; }