We study the dependence of the superconducting gaps on both the disorder and the temperature within the two-band model for iron-based materials. In the clean limit, the system is in the $s_pm$ state with the sign-changing gaps. Scattering by nonmagnetic impurities leads to the change of sign of the smaller gap thus resulting in a transition from the $s_{pm}$ to the $s_{++}$ state with the sign-preserving gaps. We show here that the transition is temperature-dependent, thus, there is a line of $s_pm to s_{++}$ transition in the temperature-disorder phase diagram. There exists a narrow range of impurity scattering rates, where the disorder-induced $s_pm to s_{++}$ transition occurs at low temperatures, but then the low-temperature $s_{++}$ state transforms back to the $s_pm$ state at higher temperatures. With increasing impurity scattering rate, temperature of such $s_{++} to s_{pm}$ transition shifts to the critical temperature $T_c$ and only the $s_{++}$ state is left for higher amount of disorder.