   if(temperature >= TEMP_MAX){
     nextState = STATE_TEMP_MAX;
     return true;
-  
+
   } else if(temperature >= TEMP_WARN){
     static unsigned long lastTempAlert = 0;
 

    if(currentState != STATE_WINDOW_WITHIN){
      shortBeepXTimesNoDelay(2);
    }
    
    currentState = STATE_WINDOW_BEFORE;
    Serial.println("Window Before");
  }

  updateDisplayBackLightSettingsForCertainModes();

  if(currentValue >= CURRENT_ENABLE_THRESHOLD){
    return STATE_WINDOW_WITHIN;
  }

  return STATE_WINDOW_BEFORE;
   
}

STATE enterWindowWithinMode(double currentValue){
  unsigned long currentTime = millis();

  static unsigned long enableWindowTime = 0;
  
  if(currentState != STATE_WINDOW_WITHIN){
    currentState = STATE_WINDOW_WITHIN;
    enableWindowTime = currentTime;


    if((currentTime - lastTempAlert) > TEMP_WARNING_RATE){
      lastTempAlert = currentTime;
      shortBeepXTimesNoDelay(5);
    }

    return true;

  }

  return false;
}
