1. More than half of the world's population lives in urban areas, a proportion that is expected to increase. Even if urbanisation is widely regarded as a major threat to global biodiversity, recent research highlighted the potential ecological importance of cities for pollinators. Key determinants of cities' ability to sustain pollinators are the presence of green areas and the connectivity between them.However, also temperature is expected to be of primary importance for pollinator activities.2. Here, we aimed at disentangling the effects of temperature, open habitat cover, and distance from the city centre on wild bee communities in the city of Rome (Italy). We selected 36 sites along two statistically independent gradients of temperature and open habitat cover, and we sampled wild bee communities using pan-traps for 4 months. Then, we measured functional traits of wild bee species, that is, body size, social behaviour, nesting strategy, and diet breadth.3. Temperature emerged as the main driver of wild bee communities, with communities richer in species and individuals at warmer temperatures. We found little species replacement between cold and warm sites. In addition, with increasing temperatures, bee communities were dominated by polylectic and small-bodied species.4. Here, we showed that in a highly urbanised environment, temperature shapes pollinator communities irrespective of other landscape metrics. Even if warming seemed beneficial for urban pollinator abundance and richness, it might strongly homogenise bee communities by selecting for those traits that make species more easily adaptable.