With climate change, heat waves have become more frequent and intense. Rotating power outages happen when the power supply is unable to meet the cooling demand increase resulting from extreme high temperatures. Power outages during heat waves expose residents to high risks of overheating. In this study, we propose a novel data-driven inverse modelling approach to inform decision makers and grid operators on planning rotating power outages. We first infer the building thermal characteristics using the connected smart thermostat data, and used the estimated thermal dynamics to simulate the thermal resilience during a heat wave event. Our proposed method was tested for the California power outage in August 2020 by using the open source Ecobee Donate Your Data dataset. We found in California the power outage should not last more than two hours during heat waves to avoid overheating risks. Informing the residents in advance so they can prepare for it through pre-cooling is a simple but effective strategy to expand the acceptable power outage duration. In addition to assisting power outage planning, the proposed method can be used for other applications, such as to evaluate a building energy efficiency policy, to examine fuel poverty, and to estimate the load shifting potential of building stocks.