no message
This commit is contained in:
@@ -91,11 +91,33 @@ class Batterie extends IPSModule
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$maxBatVar = $this->ReadPropertyInteger("MaxBatterieleistung");
|
||||||
|
$maxNachVar = $this->ReadPropertyInteger("MaxNachladen");
|
||||||
|
|
||||||
|
if ($maxBatVar > 0) {
|
||||||
|
$this->RegisterMessage($maxBatVar, VM_UPDATE);
|
||||||
|
}
|
||||||
|
if ($maxNachVar > 0) {
|
||||||
|
$this->RegisterMessage($maxNachVar, VM_UPDATE);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function MessageSink($TimeStamp, $SenderID, $Message, $Data)
|
||||||
|
{
|
||||||
|
if ($Message !== VM_UPDATE) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
$maxBatVar = $this->ReadPropertyInteger("MaxBatterieleistung");
|
||||||
|
$maxNachVar = $this->ReadPropertyInteger("MaxNachladen");
|
||||||
|
|
||||||
|
if ($SenderID === $maxBatVar || $SenderID === $maxNachVar) {
|
||||||
|
// PowerSteps sofort neu berechnen (mit aktuellem Peak-Status)
|
||||||
|
$this->GetCurrentData($this->GetValue("Is_Peak_Shaving"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user