fix(ladestation): Ladeende nach Update neu prüfen
This commit is contained in:
@@ -117,6 +117,10 @@ class LadestationStandAlone extends IPSModule implements VerbraucherSchnittstell
|
|||||||
$this->initialisiereLokaleEinstellungen();
|
$this->initialisiereLokaleEinstellungen();
|
||||||
$this->aktualisiereVariablen();
|
$this->aktualisiereVariablen();
|
||||||
|
|
||||||
|
// Ein persistiertes Ladeende nach Neueinrichtung oder Modulupdate einmal neu pruefen.
|
||||||
|
$this->setzeZustand('FahrzeugGeladen', false);
|
||||||
|
$this->WriteAttributeInteger('LetzterGesetzterStrom', -1);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$this->pruefeKonfiguration();
|
$this->pruefeKonfiguration();
|
||||||
} catch (Throwable $fehler) {
|
} catch (Throwable $fehler) {
|
||||||
|
|||||||
@@ -151,6 +151,29 @@ return static function (TestContext $test): void {
|
|||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$test->runCase('ApplyChanges prueft ein gespeichertes Ladeende neu', static function (
|
||||||
|
TestContext $test
|
||||||
|
) use ($goEAntwort, $solarPause): void {
|
||||||
|
IPS_RequestAction($solarPause, 'Solarladen', false);
|
||||||
|
IPS_RequestAction($solarPause, 'Statuszyklus', false);
|
||||||
|
$test->assertSame(
|
||||||
|
true,
|
||||||
|
GetValue($test->objectByIdent('FahrzeugGeladen', $solarPause))
|
||||||
|
);
|
||||||
|
|
||||||
|
IPS_SetProperty($solarPause, 'Testantwort', $goEAntwort(2, 2300));
|
||||||
|
IPS_ApplyChanges($solarPause);
|
||||||
|
|
||||||
|
$test->assertSame(
|
||||||
|
false,
|
||||||
|
GetValue($test->objectByIdent('FahrzeugGeladen', $solarPause))
|
||||||
|
);
|
||||||
|
$test->assertSame(
|
||||||
|
3,
|
||||||
|
GetValue($test->objectByIdent('Fahrzeugstatus', $solarPause))
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
$test->runCase('Solar- und Peakbetrieb liefern die Enelix-1-Angebote', static function (
|
$test->runCase('Solar- und Peakbetrieb liefern die Enelix-1-Angebote', static function (
|
||||||
TestContext $test
|
TestContext $test
|
||||||
) use ($stationen, $anforderungSenden): void {
|
) use ($stationen, $anforderungSenden): void {
|
||||||
|
|||||||
Reference in New Issue
Block a user