Leistung hinzugefügt
This commit is contained in:
@@ -37,14 +37,14 @@
|
||||
},
|
||||
{
|
||||
"type": "SelectVariable",
|
||||
"name": "Ladestrom",
|
||||
"caption": "Ladestrom",
|
||||
"name": "Entladeleistung",
|
||||
"caption": "Entladeleistung",
|
||||
"test": true
|
||||
},
|
||||
{
|
||||
"type": "SelectVariable",
|
||||
"name": "Entladestrom",
|
||||
"caption": "Entladestrom",
|
||||
"name": "Ladeleistung",
|
||||
"caption": "Ladeleistung",
|
||||
"test": true
|
||||
}
|
||||
|
||||
|
||||
@@ -12,12 +12,13 @@ class Batterie extends IPSModule
|
||||
$this->RegisterPropertyInteger("AufdasNachladen",0);
|
||||
$this->RegisterPropertyInteger("MinimumEntladen",0);
|
||||
$this->RegisterPropertyInteger("Batterieladezustand",0);
|
||||
//$this->RegisterPropertyFloat("Ladestrom",0);
|
||||
//$this->RegisterPropertyFloat("Entladestrom",0);
|
||||
|
||||
|
||||
// Variabeln für Kommunkation mit Manager
|
||||
$this->RegisterVariableFloat("Ladestrom", "Ladestrom", "", 0);
|
||||
$this->RegisterVariableFloat("Entladestrom", "Entladestrom", "", 0);
|
||||
$this->RegisterVariableFloat("Ladeleistung", "Ladeleistung", "", 0);
|
||||
$this->RegisterVariableFloat("Entladeleistung", "Entladeleistung", "", 0);
|
||||
$this->RegisterVariableInteger("Aktuelle_Leistung", "Aktuelle_Leistung", "", 0);
|
||||
$this->RegisterVariableString("PowerSteps", "PowerSteps");
|
||||
$this->RegisterVariableBoolean("Idle", "Idle", "", 0);
|
||||
@@ -91,8 +92,16 @@ public function RequestAction($Ident, $Value)
|
||||
|
||||
public function SetAktuelle_Leistung(int $power)
|
||||
{
|
||||
$batterieladezustand = $this->ReadPropertyInteger("Batterieladezustand"); // Als Property gelesen
|
||||
$maxleistung = $this->ReadPropertyInteger("MaxBatterieleistung"); // Als Property gelesen
|
||||
|
||||
$ladeleistung = $this->ReadPropertyFloat("Ladeleistung");
|
||||
$entladeleistung = $this->ReadPropertyFloat("Entladeleistung"); // Korrigierter Name
|
||||
|
||||
if ($power >= 0) {
|
||||
$this->SetValue("Ladeleistung", $power);
|
||||
} else {
|
||||
$this->SetValue("Entladeleistung", abs($power));
|
||||
}
|
||||
|
||||
$spannung = $this->ReadPropertyInteger("Batteriespannung"); // Spannung ebenfalls als Property
|
||||
//$ladestrom = GetValue($this->GetIDForIdent("Ladestrom"));
|
||||
//$entladestrom = GetValue($this->GetIDForIdent("Entladestrom"));
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
"compatibility": {
|
||||
"version": "7.1"
|
||||
},
|
||||
"version": "1.046",
|
||||
"version": "1.047",
|
||||
"build": 0,
|
||||
"date": 0
|
||||
}
|
||||
Reference in New Issue
Block a user