den rest hinzgefühgt
This commit is contained in:
@@ -206,5 +206,44 @@ class WP_Steurung extends IPSModule {
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
// Methode zum Abrufen der aktuellen Daten
|
||||
public function GetCurrentData(bool $Peak) {
|
||||
|
||||
// tagessperrzeit berechnen
|
||||
|
||||
|
||||
|
||||
$this->SetValue("LetzterPeakwert", $Peak);
|
||||
|
||||
|
||||
if($this->GetValue("WP_Laufzeit_Zahler")<(20*12)){
|
||||
|
||||
$this->SetValue("PowerSteps", json_encode([$this->ReadPropertyInteger("CurrentPower")]));
|
||||
|
||||
}else{
|
||||
|
||||
$this->SetValue("PowerSteps", json_encode([0, $this->ReadPropertyInteger("WP_Leistung")]));
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public function CheckIdle($power){
|
||||
$lastpower = GetValue($this->GetIDForIdent("CurrentPower"));
|
||||
if($lastpower != $power){
|
||||
$this->SetValue("Idle", false);
|
||||
$this->SetValue("IdleCounter", $this->ReadPropertyInteger("IdleCounterMax"));
|
||||
}
|
||||
// IdleCounter auslesen und verarbeiten
|
||||
$idleCounter = $this->GetValue("IdleCounter");
|
||||
if ($idleCounter > 0) {
|
||||
$this->SetValue("Idle", false);
|
||||
$this->SetValue("IdleCounter", $idleCounter - 1);
|
||||
} else {
|
||||
$this->SetValue("Idle", true);
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
@@ -6,7 +6,7 @@
|
||||
"compatibility": {
|
||||
"version": "7.1"
|
||||
},
|
||||
"version": "0.105",
|
||||
"version": "0.106",
|
||||
"build": 0,
|
||||
"date": 0
|
||||
}
|
||||
Reference in New Issue
Block a user