Blynk timer Alarm

I have a float switch which controls a solenoid valve for CO2 gas. When the float is LOW it turns the valve on and when it is HIGH it turns the valve off. I am trying to insert a fail safe that should the float get stuck in the LOW position for a period of time it will trigger an alarm sequence to tell me that either there is a fault with the float switch or that the CO2 bottle is empty.
I found this code on the forum which i tried

int longPressMillis = 1000;    // time in millis needed for longpress
boolean buttonState = false

// Blynk On/Off button in app
BLYNK_WRITE(1) {
  if (param.asInt() == 1) {     // if button is pressed
     longPressTimer = timer.setTimeout(longPressMillis, onOffToggle);  // start the timer to run the function in defined time
     } else {
       timer.deleteTimer(longPressTimer);  // Stop and delete the timer if button is released to early
     }
   }
    

// Function called by BLYNK_WRITE(1)
// This function toggles something
void onOffToggle() {
  if (buttonState == true) {
    // do something if true
    buttonState = false;
  } else {
    // do something if not true
   buttonState = true;
  }
}

My code based on above

//FLOAT SWITCH WITH ALARM FUNCTION
void FloatSw() //REVERSE FLOAT SWITCH VERSION
{
  SensorState = digitalRead(SensorPin);        //Read value from float switch
  if (modeState == true)
  {
    if (SensorState == LOW)
    {
      digitalWrite(CO2Pin, HIGH);                //Turn CO2 ON
      digitalWrite(LedCO2, HIGH);                //Turn CO2 LED ON
      CO2.setColor(Blue);
      CO2.on();                                  //Turn App LED ON
      FAT = timer.setTimeout(AlarmTime, AlarmFunction);   //timer countdown to AlarmFunction if SensorState is LOW
    }
    else
    {
      timer.deleteTimer(FAT);         //Timer deleted if SensorState is HIGH before AlarmTime
      digitalWrite(CO2Pin, LOW);                 //Turn CO2 OFF
      digitalWrite(LedCO2, LOW);                 //Turn CO2 LED OFF
      CO2.off();                                 //Turn App LED OFF
    }
  }
  else
  {
    timer.deleteTimer(FAT);
    digitalWrite(CO2Pin, LOW);                 //Turn CO2 OFF
    digitalWrite(LedCO2, LOW);                 //Turn CO2 LED OFF
    CO2.off();                                 //Turn App LED OFF
  }
}
    
void AlarmFunction()
{
  timer.enable(ALT);                      //start timer for AlarmFunction()
  SensorState = digitalRead(SensorPin);   //Check float switch again
  if (SensorState == LOW)
  {
    digitalWrite(CO2Pin, LOW);
    digitalWrite(LedCO2, HIGH);
    CO2.setColor(Red);
    CO2.on();
    if (notificationState == true)
    {
      Blynk.notify("CO2 ERROR - CHECK");
      notificationState = false;
    }
  }
  else if (SensorState == HIGH)
  {
    FloatSw();
    notificationState = true;
    timer.disable(ALT);                 //stop timer for AlarmFunction()
  }
}

Now what happens is when the float is LOW it triggers the FAT timer and if the float switch returns to HIGH before the AlarmTime has elapsed the FAT timer continues in the background, and should the float go LOW withing that period it goes to the Alarm sequence. It seems to me that once you have started the FAT timer you cannot delete it until complete.
Any ideas how I can incorporate this alarm function into my programme? What i would like it to do is the float switch will turn on and off the CO2 accordingly But if the float switch gets stuck on the LOW position of even the gas CO2 has rum out to send me a warning.