fix(ladestation): Ladeanlauf und Easee-Verbindung stabilisieren
Tests / test (push) Successful in 1m23s
Tests / test (push) Successful in 1m23s
This commit is contained in:
@@ -87,6 +87,7 @@ class LadestationStandAlone extends IPSModule implements VerbraucherSchnittstell
|
||||
$this->RegisterAttributeInteger('LetzteManagerID', 0);
|
||||
$this->RegisterAttributeInteger('LetzteVorgabeZeit', 0);
|
||||
$this->RegisterAttributeInteger('LetzterGesetzterStrom', -1);
|
||||
$this->RegisterAttributeBoolean('LadeleistungSeitFreigabeErkannt', false);
|
||||
|
||||
$this->RegisterTimer(
|
||||
'Statuszyklus',
|
||||
@@ -120,6 +121,7 @@ class LadestationStandAlone extends IPSModule implements VerbraucherSchnittstell
|
||||
// Ein persistiertes Ladeende nach Neueinrichtung oder Modulupdate einmal neu pruefen.
|
||||
$this->setzeZustand('FahrzeugGeladen', false);
|
||||
$this->WriteAttributeInteger('LetzterGesetzterStrom', -1);
|
||||
$this->WriteAttributeBoolean('LadeleistungSeitFreigabeErkannt', false);
|
||||
|
||||
try {
|
||||
$this->pruefeKonfiguration();
|
||||
@@ -307,8 +309,14 @@ class LadestationStandAlone extends IPSModule implements VerbraucherSchnittstell
|
||||
$rohstatus,
|
||||
$this->ReadAttributeBoolean('ZustandFahrzeugVerbunden'),
|
||||
$this->ReadAttributeBoolean('ZustandFahrzeugGeladen'),
|
||||
$this->ReadAttributeInteger('LetzterGesetzterStrom') >= 6
|
||||
$this->ReadAttributeInteger('LetzterGesetzterStrom') >= 6,
|
||||
$this->ReadAttributeBoolean('LadeleistungSeitFreigabeErkannt')
|
||||
);
|
||||
if (!$status['FahrzeugVerbunden']) {
|
||||
$this->WriteAttributeBoolean('LadeleistungSeitFreigabeErkannt', false);
|
||||
} elseif ($status['Ladestrom_A'] >= 3.5) {
|
||||
$this->WriteAttributeBoolean('LadeleistungSeitFreigabeErkannt', true);
|
||||
}
|
||||
|
||||
foreach ($status as $ident => $wert) {
|
||||
$this->setzeZustand($ident, $wert);
|
||||
@@ -342,6 +350,7 @@ class LadestationStandAlone extends IPSModule implements VerbraucherSchnittstell
|
||||
if ($strom === $this->ReadAttributeInteger('LetzterGesetzterStrom')) {
|
||||
return;
|
||||
}
|
||||
$this->WriteAttributeBoolean('LadeleistungSeitFreigabeErkannt', false);
|
||||
|
||||
$transport = new LadestationTransport(
|
||||
fn (array $anfrage): string => $this->fuehreHttpAnfrageAus($anfrage)
|
||||
|
||||
Reference in New Issue
Block a user