We study temporally persistent and spatially extended extreme events of temperature anomalies, i.e. heat waves and cold spells, using large deviation theory. To this end, we consider a simplified yet Earth-like general circulation model of the atmosphere and numerically estimate large deviation rate functions of near-surface temperature in the mid-latitudes. We find that, after a re-normalisation based on the integrated auto-correlation, the rate function one obtains at a given latitude by looking locally in space at long time averages agrees with what is obtained, instead, by looking locally in time at large spatial averages along the latitude. This is a result of scale symmetry in the spatio-temporal turbulence and of the fact that advection is primarily zonal. This agreement hints at the universality of large deviations of the temperature field. Furthermore, we discover that the obtained rate function is able to describe the statistics of temporal averages of spatial averages performed over large spatial scales, thus allowing one to look into spatio-temporal large deviations. Finally, we find out that, as a result of a modification in the rate function, large deviations are relatively more likely to occur when looking at spatial averages performed over intermediate scales. This is due to the existence of weather patterns associated with the low-frequency variability of the atmosphere, which are responsible for extended and temporally persistent heat waves or cold spells. Extreme value theory is used to benchmark our results.