Assuming you are using latest firmware version this would be the relevant code:
if (wait && temperatureInCelsius > MAX_ROOM_TEMPERATURE
#if defined(SKIP_M109_IF_WITHIN) && SKIP_M109_IF_WITHIN > 0
&& !(abs(tc->currentTemperatureC - tc->targetTemperatureC) < (SKIP_M109_IF_WITHIN)) // Already in range
#endif
) {
Extruder* actExtruder = &extruder[extr];
UI_STATUS_UPD_F(Com::translatedF(UI_TEXT_HEATING_EXTRUDER_ID));
EVENT_WAITING_HEATER(actExtruder->id);
bool dirRising = actExtruder->tempControl.targetTemperatureC > actExtruder->tempControl.currentTemperatureC;
//millis_t printedTime = HAL::timeInMilliseconds();
millis_t waituntil = 0;
#if RETRACT_DURING_HEATUP
uint8_t retracted = 0;
#endif
millis_t currentTime;
millis_t maxWaitUntil = 0;
bool oldAutoreport = Printer::isAutoreportTemp();
Printer::setAutoreportTemp(true);
do {
previousMillisCmd = currentTime = HAL::timeInMilliseconds();
/if( (currentTime - printedTime) > 1000 ) //Print Temp Reading every 1 second while heating up.
{
Commands::printTemperatures();
printedTime = currentTime;
}*/
Commands::checkForPeriodicalActions(true);
GCode::keepAlive(WaitHeater);
//gcode_read_serial();
#if RETRACT_DURING_HEATUP
if (actExtruder == Extruder::current && actExtruder->waitRetractUnits > 0 && !retracted && dirRising && actExtruder->tempControl.currentTemperatureC > actExtruder->waitRetractTemperature) {
PrintLine::moveRelativeDistanceInSteps(0, 0, 0, -actExtruder->waitRetractUnits * Printer::axisStepsPerMM[E_AXIS], actExtruder->maxFeedrate / 4, false, false);
retracted = 1;
}
#endif
if (maxWaitUntil == 0) {
if (dirRising ? actExtruder->tempControl.currentTemperatureC >= actExtruder->tempControl.targetTemperatureC - 5 : actExtruder->tempControl.currentTemperatureC <= actExtruder->tempControl.targetTemperatureC + 5) {
maxWaitUntil = currentTime + 120000L;
}
} else if ((millis_t)(maxWaitUntil - currentTime) < 2000000000UL) {
break;
}
if ((waituntil == 0 && (dirRising ? actExtruder->tempControl.currentTemperatureC >= actExtruder->tempControl.targetTemperatureC - 1 : actExtruder->tempControl.currentTemperatureC <= actExtruder->tempControl.targetTemperatureC + 1))
#if defined(TEMP_HYSTERESIS) && TEMP_HYSTERESIS >= 1
(waituntil != 0 && (abs(actExtruder->tempControl.currentTemperatureC - actExtruder->tempControl.targetTemperatureC)) > TEMP_HYSTERESIS)
#endif
) {
waituntil = currentTime + 1000UL * (millis_t)actExtruder->watchPeriod; // now wait for temp. to stabilize
}
if (Printer::breakLongCommand) {
break;
}
} while (!Printer::failedMode && (waituntil == 0 || (waituntil != 0 && (millis_t)(waituntil - currentTime) < 2000000000UL)));
Printer::setAutoreportTemp(oldAutoreport);
#if RETRACT_DURING_HEATUP
if (retracted && actExtruder == Extruder::current) {
PrintLine::moveRelativeDistanceInSteps(0, 0, 0, actExtruder->waitRetractUnits * Printer::axisStepsPerMM[E_AXIS], actExtruder->maxFeedrate / 4, false, false);
}
#endif
EVENT_HEATING_FINISHED(actExtruder->id);
}
you see only way to skip waiting in your case is temperatureInCelsius > MAX_ROOM_TEMPERATURE" but I assume 5°C less is not MAX_ROOM_TEMPERATURE
There is also no special case for 5° as you see. What happens at 4°C or 6°C difference? It is hard to get exactly 5°C especially since it is a float value so it could also be 5.01 difference.
Which firmware version are you using?