code vereinfacht

This commit is contained in:
mh
2025-02-24 14:02:07 +01:00
parent 37c52e96f3
commit 9bf65d9b02
2 changed files with 4 additions and 13 deletions
+3 -12
View File
@@ -91,25 +91,16 @@ public function RequestAction($Ident, $Value)
public function SetAktuelle_Leistung(int $power) public function SetAktuelle_Leistung(int $power)
{ {
/* /
if ($power >= 0){ if ($power >= 0){
SetValue($this->ReadPropertyFloat("Ladeleistung"), $power); SetValue($this->ReadPropertyFloat("Ladeleistung"), $power);
SetValue($this->ReadPropertyFloat("Entladeleistung"),0); SetValue($this->ReadPropertyFloat("Entladeleistung"),0);
}else{ }else{
SetValue($this->ReadPropertyFloat("Entladeleistung"), abs($power)); SetValue($this->ReadPropertyFloat("Entladeleistung"), abs($power));
SetValue($this->ReadPropertyFloat("Ladeleistung"), 0); SetValue($this->ReadPropertyFloat("Ladeleistung"), 0);
}*/ }
$ladeleistungID = $this->ReadPropertyInteger("Ladeleistung");
$entladeleistungID = $this->ReadPropertyInteger("Entladeleistung");
if ($ladeleistungID > 0 && IPS_VariableExists($ladeleistungID)) {
SetValue($ladeleistungID, floatval($power));
}
if ($entladeleistungID > 0 && IPS_VariableExists($entladeleistungID)) {
SetValue($entladeleistungID, floatval(abs($power)));
}
+1 -1
View File
@@ -6,7 +6,7 @@
"compatibility": { "compatibility": {
"version": "7.1" "version": "7.1"
}, },
"version": "1.064", "version": "1.065",
"build": 0, "build": 0,
"date": 0 "date": 0
} }