From bf73d0a478f8b78ded123bb5e2c75154e370077a Mon Sep 17 00:00:00 2001 From: "belevo\\mh" Date: Tue, 7 Jan 2025 10:36:50 +0100 Subject: [PATCH] Aktion --- Batterie/module.php | 14 ++++++++++++-- Boiler_2_Stufig_Mit_Fueler/module.php | 14 ++++++++++++++ library.json | 2 +- 3 files changed, 27 insertions(+), 3 deletions(-) diff --git a/Batterie/module.php b/Batterie/module.php index e741f7d..f79d789 100644 --- a/Batterie/module.php +++ b/Batterie/module.php @@ -16,12 +16,14 @@ class Batterie extends IPSModule $this->RegisterPropertyInteger("Entladestrom", 0); // Variabeln für Kommunkation mit Manager - $this->RegisterVariableInteger("Aktuelle_Leistung", "Aktuelle_Leistung", "", 0); + $this->RegisterVariableProfile("Batterie.Leistung", 1, "W"); + $this->RegisterVariableProfile("Batterie.Strom", 1, "A"); + $this->RegisterVariableInteger("Aktuelle_Leistung", "Aktuelle_Leistung", "Batterie.Leistung", 0); $this->RegisterVariableString("PowerSteps", "PowerSteps"); $this->RegisterVariableBoolean("Idle", "Idle", "", 0); $this->RegisterVariableInteger("Sperre_Prio", "Sperre_Prio"); $this->RegisterVariableInteger("PV_Prio", "PV_Prio"); - $this->RegisterVariableFloat("Bezogene_Energie", "Bezogene_Energie", "", 0); + $this->RegisterVariableFloat("Bezogene_Energie", "Bezogene_Energie", "Batterie.Leistung", 0); // Hilfsvariabeln für Idle zustand $this->RegisterPropertyInteger("IdleCounterMax", 2); @@ -53,6 +55,14 @@ class Batterie extends IPSModule return $array_powersteps; } +private function RegisterVariableProfile(string $name, int $type, string $suffix) +{ + if (!IPS_VariableProfileExists($name)) { + IPS_CreateVariableProfile($name, $type); + IPS_SetVariableProfileText($name, "", $suffix); + } +} + public function RequestAction($Ident, $Value) { diff --git a/Boiler_2_Stufig_Mit_Fueler/module.php b/Boiler_2_Stufig_Mit_Fueler/module.php index d2a642c..e630eb3 100644 --- a/Boiler_2_Stufig_Mit_Fueler/module.php +++ b/Boiler_2_Stufig_Mit_Fueler/module.php @@ -55,6 +55,20 @@ class Boiler_2_Stufig_Mit_Fueler extends IPSModule break; case "GetCurrentData": return $this->GetCurrentData($Value); + case "Mindesttemperatur": + // Setze den neuen Wert für Mindesttemperatur + $this->SetValue($Ident, $Value); + break; + + case "Maximaltemperatur": + // Setze den neuen Wert für Maximaltemperatur + $this->SetValue($Ident, $Value); + break; + + case "Legionellentemperatur": + // Setze den neuen Wert für Legionellentemperatur + $this->SetValue($Ident, $Value); + break; default: throw new Exception("Invalid Ident"); } diff --git a/library.json b/library.json index 46bd6db..7e68d5f 100644 --- a/library.json +++ b/library.json @@ -6,7 +6,7 @@ "compatibility": { "version": "7.1" }, - "version": "0.262", + "version": "0.263", "build": 0, "date": 0