(Bloomberg) -- The batteries that help fortify California’s electric grid are kicking in at times when they’re not really needed, draining the power source before more critical junctures and heightening the chances of blackouts as a blistering heat wave punishes the state. 

Batteries help to store extra electricity, generated by solar or hydropower. That surplus is supposed to act as a cushion for times when those intermittent renewable sources are running low. But the grid uses a pricing mechanism to trigger the batteries, rather than basing it on pure demand levels. That can lead to mismatches.

That’s exactly what happened on Tuesday, when the state declared a grid emergency and only narrowly avoided major power outages.

Batteries began discharging in the middle of the afternoon, when there was still plenty of solar power and other supplies available to meet electricity demand. That depleted the cushion before it was more critically needed in the early evening, when the state was on the brink of rotating blackouts as demand hit an all-time record and solar supplies started dropping as the sun set. If it weren’t for a timely emergency mobile-phone alert calling on Californians to conserve power immediately, swaths of the state could have been plunged into darkness.

While blackouts were averted on Tuesday, the battery situation points to a deeper issue with the grid that could continue to exacerbate the risk of outages until it’s resolved. On Wednesday afternoon, the state’s grid operator ratcheted its energy emergency to the second of three levels after 1 p.m. local time and once again warned California could face power shortfalls. The emergency was canceled late Wednesday without needing to call for rolling blackouts. 

The reason for Tuesday’s earlier-than-expected deployment of batteries likely has to do with market signals. The way the California power market is set up now, energy storage systems are called upon to dispatch by the grid operator when the wholesale power price hits a cap of $1,000 a megawatt-hour, said Cody Hill, senior vice president of battery systems at Rev Renewables, a renewable energy and storage company.

With unusually high demand on the grid Tuesday due to the record heat, that price cap was hit by mid-afternoon, calling the batteries into service. 

“Batteries got discharged earlier in the day than they probably wanted them to,” Hill said. “But there is no way to convey that to the market when prices are above the cap.”

The California Independent System Operator, which runs the state grid, didn't immediately respond to request for comment.

One bright spot: Despite the issues, batteries did manage to offer nearly 2,700 megawatts of supply — or slightly more than two-thirds of the total capacity — between 6 p.m. and 7 p.m. local time on Tuesday, when the extra juice was really needed. 

But to avoid the potential for mismatches in the future, California likely needs to rejigger its power-market signals for its growing battery fleet.

“The way batteries are operated on the grid, we are still on a steep learning curve,” said Severin Borenstein, an energy professor at the University of California at Berkeley and member of the board of governors of Caiso. “We are still learning about the right way to integrate them.”

(Adds details on Wednesday power emergency in fifth paragraph.)

©2022 Bloomberg L.P.