Can someone explain this to me? This is riddiculus!

I got a test program running the leds on my board to test if all is connected correctly and it works as it should. The LEDs are blinking.

    digitalWrite(WaterLED, HIGH);
    digitalWrite(PowerLED, LOW);
    digitalWrite(Sens1LED, HIGH);
    digitalWrite(Sens2LED, HIGH);
    delay(800);

    digitalWrite(PowerLED, HIGH);
    digitalWrite(ErrorLED, LOW);
    digitalWrite(Sens1LED, LOW);
    digitalWrite(Sens2LED, LOW);
    delay(800);

    digitalWrite(ErrorLED, HIGH);
    digitalWrite(WaterLED, LOW);
    digitalWrite(Sens1LED, HIGH);
    digitalWrite(Sens2LED, HIGH);
    delay(800);

Now I tried to test the pump output and wanted the power LED on the same time the pump is on.

So I did this sketch in the loop:

  digitalWrite(PowerLED, LOW);
  // digitalWrite(Pump1, HIGH);   
  delay(800);
  
  digitalWrite(PowerLED, HIGH);
  // digitalWrite(Pump1, LOW);

(I later outcommented the pump because I assumed this might be causing the behavior but it isn’t)

But now (even with only LED output) the LED lights up and stays on as if the code is no longer executed after the delay.

I can’t find a reason!

Here is the full code:

// Definitionen
#define Calib1Button A3 // A3
#define Calib2Button A4 //A4
#define Sens1 A1 // A1
#define Sens2 A2 // A2
#define SensWater A0 // A0 
#define PowerLED 3 // D3 -- LOW leuchtet
#define ErrorLED 2 // D2 -- LOW leuchtet
#define WaterLED 4 // D4 -- LOW leuchtet
#define Sens1LED 5 // D5 -- HIGH leuchtet
#define Sens2LED 6 // D6 -- HIGH leuchtet
#define Pump1 7 // D7
#define Pump2 8 // D8



// Programmvariablen
bool Calib1 = 0;
bool Calib2 = 0;
bool Err1 = 0;
bool Err2 = 0;
bool ErrWass = 0;
unsigned long MessTimer = (1000UL * 60 * 10);                           // Mess Abstand (10 Min)
unsigned long GiessTimer = (1000UL * 10);                               // Gieß-Zeit (10 Sek)





// Aus altem Programm
// Timer Variablen definieren
unsigned long WarnLEDTimerElapsed = 0;                                // Warn LED Timer Zeitmessung
unsigned long ErrLEDTimerElapsed = 0;                                 // Error LED Timer Zeitmessung
unsigned long PushTimerElapsed = 0;                                   // Blynk Push Timer Zeitmessung
unsigned long MesseToepfeTimerElapsed = 0;                            // Topfmessung Timer Zeitmessung

unsigned long WarnLEDTime = 800;                                      // Warn LED Timer Zeit (ms) - (0,8 Sek)
unsigned long ErrLEDTime = 300;                                       // Error LED Timer Zeit (ms) - (0,3 Sek)




void setup() {
  Serial.begin(115200);

  // Pins definieren
  pinMode(Calib1Button, INPUT);
  pinMode(Calib2Button, INPUT);
  pinMode(Sens1, INPUT);
  pinMode(Sens2, INPUT);
  pinMode(SensWater, INPUT);
  pinMode(PowerLED, OUTPUT);
  pinMode(ErrorLED, OUTPUT);
  pinMode(Sens1LED, OUTPUT);
  pinMode(Sens2LED, OUTPUT);
  pinMode(WaterLED, OUTPUT);
  pinMode(Pump1, OUTPUT);
  pinMode(Pump2, OUTPUT);

  // Alle Ausgänge aus
  digitalWrite(PowerLED, HIGH);
  digitalWrite(ErrorLED, HIGH);
  digitalWrite(WaterLED, HIGH);
  digitalWrite(Sens1LED, LOW);
  digitalWrite(Sens2LED, LOW);
  digitalWrite(Pump1, LOW);
  digitalWrite(Pump2, LOW);  
}


void loop() {

/* working:
    digitalWrite(WaterLED, HIGH);
    digitalWrite(PowerLED, LOW);
    digitalWrite(Sens1LED, HIGH);
    digitalWrite(Sens2LED, HIGH);
    delay(800);

    digitalWrite(PowerLED, HIGH);
    digitalWrite(ErrorLED, LOW);
    digitalWrite(Sens1LED, LOW);
    digitalWrite(Sens2LED, LOW);
    delay(800);

    digitalWrite(ErrorLED, HIGH);
    digitalWrite(WaterLED, LOW);
    digitalWrite(Sens1LED, HIGH);
    digitalWrite(Sens2LED, HIGH);
    delay(800);
}
*/

//Not working:

  digitalWrite(PowerLED, LOW);
  // digitalWrite(Pump1, HIGH);   
  delay(800);
  
  digitalWrite(PowerLED, HIGH);
  // digitalWrite(Pump1, LOW);
}

Btw… I tried uploading multiple time, resetting after uplod etc.
Also the Power LED is a RGB common Anode LED so I have to pull it low to light up

When you turn the LED off, you are immediately going to the beginning of the loop and turning it back on, with no delay.

  digitalWrite(PowerLED, LOW);
  // digitalWrite(Pump1, HIGH);   
  delay(800);
  
  digitalWrite(PowerLED, HIGH);
  // digitalWrite(Pump1, LOW);
  delay(800); // THIS ONE IS IMPORTANT
 //^^^^^^^^^^^^^^^^^^^^^^^^

Ahhh ok I'n soooo stupid.... Thanks!