Green roofs play a crucial role in climate change mitigation strategies. They are supposed to reduce the risk of urban floods after heavy rainfalls on the one hand, and on the other one to cool cities by evapotranspiration and thus, to avoid the formation of urban heat islands. However, currently most green roofs in Germany are extensive greenings. They are designed as dry sites with shallow and well-drained vegetation layers, without additional irrigation and greened with highly drought-adapted plants mainly sedum. Therefore, during the last years, a new kind of extensive green roofs was developed. They still consist of shallow vegetation layers, but they are equipped with sub-surface irrigation, voluminous retention elements as temporary water reservoir beneath the vegetation layer, and they are greened with plants high in transpiration. However, this new kind of green roofs is also facing a conflict of objectives between storm water retention and cooling performance. To solve this conflict, an adaptive and sensor-based water management system was developed. It consists of two main components: irrigation management of the plants and management of storm water run-off, especially by the control of the water level in the retention element. For the irrigation management, a decision matrix was developed to adapt the irrigation strategy taking into account if cooling performance or water retention has higher priority. Prioritization is based on thermal discomfort and rain forecast. The decision matrix uses environmental conditions, data of the weather forecast and information about water resources (e.g., grey water, water supply in the retention element). For the management of storm water, run-off is actively controlled and the vegetation layer is used as temporary water storage. In combination with a retention element, this can quadruple water retention capacity of green roofs. The amount of water stored in the green roof system - especially in the retention element - is mainly controlled on radar-based precipitation data in real time.