fix(ladestation): Ladeanlauf und Easee-Verbindung stabilisieren
Tests / test (push) Successful in 1m23s
Tests / test (push) Successful in 1m23s
This commit is contained in:
@@ -33,12 +33,23 @@ final class LadestationReglerTest extends TestCase
|
||||
self::assertEqualsWithDelta(10.0, $status['Ladestrom_A'], 0.01);
|
||||
}
|
||||
|
||||
public function testGeladenWirdNachVerbindungUnterSechsAmpereErkannt(): void
|
||||
public function testAnlaufOhneGemesseneLadeleistungGiltNichtAlsLadeende(): void
|
||||
{
|
||||
$status = LadestationRegler::normalisiereStatus([
|
||||
'Rohstatus' => 2,
|
||||
'Istleistung_W' => 0.0,
|
||||
], true);
|
||||
], true, false, true, false);
|
||||
|
||||
self::assertFalse($status['FahrzeugGeladen']);
|
||||
self::assertSame(2, $status['Fahrzeugstatus']);
|
||||
}
|
||||
|
||||
public function testGeladenWirdErstNachZuvorGemessenerLadeleistungErkannt(): void
|
||||
{
|
||||
$status = LadestationRegler::normalisiereStatus([
|
||||
'Rohstatus' => 2,
|
||||
'Istleistung_W' => 0.0,
|
||||
], true, false, true, true);
|
||||
|
||||
self::assertTrue($status['FahrzeugGeladen']);
|
||||
self::assertSame(4, $status['Fahrzeugstatus']);
|
||||
|
||||
@@ -228,4 +228,34 @@ return static function (TestContext $test): void {
|
||||
'alw=0'
|
||||
), 'Peak mit Solarladen muss die Ladestation stoppen.');
|
||||
});
|
||||
|
||||
$test->runCase('Sollwert bleibt waehrend der Ladeanlaufzeit gueltig', static function (
|
||||
TestContext $test
|
||||
) use ($goEAntwort, $stationen, $anforderungSenden): void {
|
||||
$stationId = $stationen['go-e Gemini'];
|
||||
IPS_SetProperty($stationId, 'Testantwort', $goEAntwort(2, 0));
|
||||
IPS_ApplyChanges($stationId);
|
||||
IPS_RequestAction($stationId, 'Aktiv', true);
|
||||
IPS_RequestAction($stationId, 'Solarladen', true);
|
||||
|
||||
$anforderungSenden($stationId, 3850);
|
||||
IPS_RequestAction($stationId, 'Statuszyklus', false);
|
||||
|
||||
$test->assertSame(
|
||||
false,
|
||||
GetValue($test->objectByIdent('FahrzeugGeladen', $stationId))
|
||||
);
|
||||
$test->assertSame(
|
||||
true,
|
||||
GetValue($test->objectByIdent('SollwertGueltig', $stationId))
|
||||
);
|
||||
$test->assertSame(
|
||||
3850,
|
||||
GetValue($test->objectByIdent('Sollleistung', $stationId))
|
||||
);
|
||||
$test->assertSame(
|
||||
'[0,1450,1690,1930,2170,2410,2650,2890,3130,3370,3610,3850]',
|
||||
(string) GetValue($test->objectByIdent('LeistungsangebotDiagnose', $stationId))
|
||||
);
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user