Last month as a heat wave slammed California, state regulators sent an email to a group of energy executives pleading for help. “Please consider this an urgent inquiry on behalf of the state,” the message said. The manager of the state’s grid was struggling to increase the supply of electricity because power plants had unexpectedly shut down and demand was surging. The imbalance was forcing officials to order rolling blackouts across the state for the first time in nearly two decades.

What was unusual about the emails was whom they were sent to: people who managed thousands of batteries installed at utilities, businesses, government facilities and even homes. California officials were seeking the energy stored in those machines to help bail out a poorly managed grid and reduce the need for blackouts.

Many energy experts have predicted that batteries could turn homes and businesses into mini-power plants that are able to play a critical role in the electricity system. They could soak up excess power from solar panels and wind turbines and provide electricity in the evenings when the sun went down or after wildfires and hurricanes, which have grown more devastating because of climate change. Over the next decade, the argument went, large rows of batteries owned by utilities could start replacing power plants fueled by natural gas.

But that day appears to be closer than earlier thought, at least in California, which leads the country in energy storage. During the state’s recent electricity crisis, more than 30,000 batteries supplied as much power as a midsize natural gas plant. And experts say the machines, which range in size from large wall-mounted televisions to shipping containers, will become even more important because utilities, businesses and homeowners are investing billions of dollars in such devices.

“People are starting to realize energy storage isn’t just a project or two here or there, it’s a whole new approach to managing power,” said John Zahurancik, chief operating officer at Fluence, which makes large energy storage systems bought by utilities and large businesses. That’s a big difference from a few years ago, he said, when electricity storage was seen as a holy grail — “perfect, but unattainable.”