The recent heatwave that blanketed the Midwest and much of the East Coast pushed America’s electricity supply to its limit. Grid operators declared max generation events, calling on every available power plant to crank out supply. It was all hands on deck. Now, after a near-collapse of America’s power grid, it should provide a critical teaching moment.

During the peak electricity demand of brutal summer heat or bitter winter cold, we’re able to cut through the political noise and clearly understand what keeps America’s lights on, the gears of industry churning, and our homes comfortable.

The data is clear. For reliable power when we need it most, the nation’s coal and natural gas power plants remain our workhorses. They rise to the occasion, going above and beyond to meet soaring demand. Unfortunately, that cannot be said for the billions of dollars in renewable energy investments.

Consider what happened to the Midcontinent Independent System Operator grid that covers parts of 15 states stretching up from Louisiana through Minnesota. This vast stretch of America includes some of the very best wind-generating real estate in the country. On June 24, just as power demand neared its peak, wind generation was all but a no-show. Of MISO’s 30 gigawatts of nameplate wind capacity — the amount of power that wind generation can provide during ideal conditions — wind provided just 2.8 GW. And of the 111 GW of demand on the MISO grid, wind power met just 2.5 percent of it.

While helpful, solar power also showed its limitations. In the New England grid on the same day, when power demand was peaking at 6 p.m., solar output was less than half of what it had been at midday. With lights coming on and air conditioners still running at full bore from the sweltering heat, solar power completely disappeared in the evening.

During a TV appearance, Energy Secretary Doug Burgum pointed out that, at 6 a.m., the nation’s largest electricity grid, PJM Interconnection serving 67 million customers, was getting only 2 percent of its power from wind and solar.

This inability of wind and solar power to match peak power demand — or the possibility of them disappearing when needed most — is a crippling limitation. How can the United States build a reliable power system around resources that, by their very nature, are as unreliable as the weather? The short answer is, we can’t.

Consider that Germany has already invested an extraordinary amount of money attempting a rapid transition to renewable energy. And now, they’ve coined a new word, dunkelflaute, which means “dark doldrums.” It aptly describes the windless and cloudy moments that can bring a renewable energy system to its knees.

Last fall, northwestern Europe experienced multiple episodes of the dark doldrums. The first, in early November, lasted 12 days. On the third day, German wind power output plunged to less than 0.2 GW, compared to an installed capacity of 70 GW. Coal and natural gas were used to hold off rolling blackouts.

We should be paying close attention. Whether in the United States or abroad, the limitations of weather-dependent solar and wind power have come into alarming focus. While these sources of power can be fuel savers, they are not grid reliability providers.

With power demand now surging from electric vehicles and data centers — and with our grid operators and reliability regulators warning of mounting reliability concerns — we must not overlook the irreplaceable importance of coal and natural gas power plants. As the recent heatwave underscored, without a balanced electricity mix, we could be left sweltering in the dark.