From 967cf93b73c6bc9608043ca75639de67acccdf4b Mon Sep 17 00:00:00 2001 From: "belevo\\mh" Date: Thu, 16 Oct 2025 14:51:11 +0200 Subject: [PATCH] no message --- Batterie_Deye/form.json | 8 +++++++- Batterie_Deye/module.php | 5 +++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/Batterie_Deye/form.json b/Batterie_Deye/form.json index ed50a04..2b4cbbf 100644 --- a/Batterie_Deye/form.json +++ b/Batterie_Deye/form.json @@ -58,10 +58,16 @@ }, { "type": "SelectVariable", - "name": "Batteriespannung", + "name": "Batteriestand", "caption": "Batteriespannung", "test": true }, + { + "type": "SelectVariable", + "name": "Batterie_Ladezustand", + "caption": "Batterie Ladeszutand %", + "test": true + }, { "type": "SelectVariable", "name": "Netzbezug", diff --git a/Batterie_Deye/module.php b/Batterie_Deye/module.php index 8ec6d56..8a6e570 100644 --- a/Batterie_Deye/module.php +++ b/Batterie_Deye/module.php @@ -12,6 +12,7 @@ class Batterie_Deye extends IPSModule $this->RegisterPropertyInteger("MaxBatterieleistung", 0); // Batteriespannug ist jetzt in % nicht mehr in V $this->RegisterPropertyInteger("Batteriespannung", 50); + $this->RegisterPropertyInteger("Batterie_Ladezustand", 50) $this->RegisterPropertyFloat("AufdasNachladen",0); $this->RegisterPropertyFloat("MinimumEntladen",0); $this->RegisterPropertyInteger("Batteriemanagement", 1); @@ -224,7 +225,7 @@ public function RequestAction($Ident, $Value) $V_Tou = GetValue($this->ReadPropertyInteger("Kotnrolle_TOU_Spannung")); $V_lad_ent = $this->GetValue("Batteriespannung_laden_entladen"); - if ($ct != $sell_Ct || $V_Tou != $V_lad_ent) { + if ($ct != $sell_Ct) { $this->SetValue("Schreibkontrolle", false); } else { $this->SetValue("Schreibkontrolle", true); @@ -254,7 +255,7 @@ public function RequestAction($Ident, $Value) $dummy_array = []; - $batterieladezustand = $V; + $batterieladezustand = GetValue($this->ReadPropertyInteger("Batterie_Ladezustand"));