Arduino with nextion display

I don't get the String obsession surfacing in this sketch.
If you want to react to single character commands, Strings do not help you in any way.

I think this code is a lot cleaner:

const int proxyPin = 2;
const int pumpPin = 12;
uint8_t proxyState;

void setup() {
  digitalWrite(pumpPin, HIGH);
  pinMode(pumpPin, OUTPUT);
  digitalWrite(pumpPin, HIGH);
  pinMode(proxyPin, INPUT_PULLUP);
  Serial.begin(115200);
  Serial.println(F("\npump control\n\n0 - off\n1 - on\n2 - one shot automatic\n"));
}

void loop() {
  if (Serial.available()) {
    proxyState = digitalRead(proxyPin);
    uint8_t rxByte = Serial.read();
    switch (rxByte) {
      case '1':
        Serial.println(F("pump on "));
        digitalWrite(pumpPin, LOW);
        break;
      case '0':
        Serial.println(F("pump off"));
        digitalWrite(pumpPin, HIGH);
        break;
      case '2':
        if (proxyState == LOW) {
          Serial.println(F("blocking auto pump started"));
          digitalWrite(pumpPin, LOW);
          delay(5000);
          digitalWrite(pumpPin, HIGH);
          Serial.println(F("blocking auto pump switches off pump"));
          delay(60000);
          Serial.println(F("blocking auto pump done"));
        } else {
          Serial.println(F("NO auto pump, proxyState is HIGH"));
        }
        break;
      case '\r':  // ignore  line ending(s)
      case '\n':
        break;
      default:
        Serial.print(F("no command attached to '"));
        Serial.write(rxByte);
        Serial.println(F("'"));
    }
  }
}

I would not use delay, but that is not the topic here.