Most of the Bay Area escaped a PG&E power outage expected for Wednesday, as the utility said weather conditions had improved.

After warning residents of Alameda, Contra Costa, Marin, Santa Clara and San Mateo counties, as well as Santa Cruz County, of planned blackouts, PG&E said Tuesday those areas would not lose power after all.

Still, 181,000 customers in 16 counties, including 51,527 in the North Bay counties of Sonoma, Solano and Napa, could experience planned outages, PG&E said. That translates to about 543,000 people throughout Northern California without power, including 154,581 in the North Bay. Earlier PG&E had predicted up to 303,000 customers —more than 900,000 people — without power.

The shut-offs are designed to prevent PG&E lines from sparking wildfires during windy, dry conditions. “There is considerable uncertainty regarding the strength, timing and humidity levels associated with this weather system,” PG&E said.

For hundreds of thousands of people who were bracing for an indeterminate time in the dark, the evolving updates brought a mingled sense of relief and frustration.

“We’ve heard from residents that it’s challenging because they want certainty,” said Laine Hendricks, a spokeswoman for Marin County. “They want to know: Will it happen or not? Will it affect me? If so, for how long?”

The changing updates are difficult for government too, as officials want to provide answers for citizens and plan for resources and services, she said. She doesn’t fault PG&E, though, noting that Mother Nature ultimately calls the shots.

Still, “the news that it was canceled is a big relief,” she said. “This would have been the third outage (in Marin) in five weeks; that’s a lot. I’m so glad our residents get a break.”

Northern California customers who still are at risk for outages have received notices via phone, text and email, PG&E said. Power would be shut down in phases starting Wednesday morning through early afternoon.

Restoring power can take several hours after weather conditions subside, because PG&E must inspect its equipment after the worst danger has passed. Still, the expected outages this week appear likely to be briefer than those in October, which spanned multiple days.

PG&E did not answer questions about how its weather forecasts had evolved. The company has said shut-off decisions are based on many factors besides weather, including the location of lines, the structure of the grid and the risks to its equipment. PG&E also has said it has made progress in “sectionalizing” its grid — limiting outages to smaller portions of the grid so more areas can stay powered.

“We have not made any changes on our end,” said Anna Schneider, a meteorologist with the National Weather Service, speaking early Tuesday afternoon. “We still have a red-flag warning for the North Bay and East Bay hills, from 4 a.m. Wednesday through 7 a.m. Thursday.” Red-flag warnings indicate high fire potential, as strong winds and dry conditions can turn a spark into a raging wildfire.

Where shut-offs are still being projected

PG&E said Tuesday it would shut off power to about a half million people across Northern California. A customer is typically a single household or business; on average, a customer translates to three people.

Power isn’t always shut off in the exact areas that experience high winds. Sometimes PG&E shuts off power to customers at some distance to the areas of high fire risk because distribution or transmission lines run through those areas.

After power is shut off, PG&E waits for dangerous weather conditions to subside. It can then take as long as 48 hours to restore power, the utility has said. PG&E expects to give the all clear Thursday.

Here are the details on PG&E’s shut-off plans for Wednesday:

Napa 11,181 customers in Angwin, Calistoga, Deer Park, Lake Berryessa, Napa, Oakville, Pope Valley, Rutherford, Saint Helena and Yountville

Solano 1,970 customers in Fairfield, Suisun City, Vacaville and Winters

Sonoma 38,376 customers in Annapolis, Bodega, Bodega Bay, Calistoga, Cazadero, Cloverdale, Duncans Mills, Forestville, Geyserville, Glen Ellen, Guerneville, Healdsburg, Jenner, Kenwood, Monte Rio, Penngrove, Petaluma, Rio Nido, Santa Rosa, Sonoma, Villa Grande and Windsor

To check if you are affected: Go to www.pge.com/psps

Source: PG&E

Sustained winds of 35 to 45 mph from the north and northeast are expected to sweep across the dry vegetation of the North Bay mountains, East Bay hills and the Diablo Range, with gusts on peaks and ridges surpassing 60 mph, the weather service said.

At the Moraga Royale, an assisted living facility for about 90 residents in suburban Contra Costa County, staff members had spent Tuesday preparing for a shut-off — though by the afternoon it appeared to have been canceled.

If the power were to go out, “we have extra staff to roam the halls, making sure everyone is secure,” said Dianne Wilson, executive director. The facility had already experienced an outage in October. “The caregivers wear headlamps at night and other big lights around their necks.”

Staffers had worked to make sure residents have enough oxygen tanks, and used an on-site machine to make ice to pack into coolers for food storage. The facility has a generator that powers a refrigerator storing medicine, as well as some hallway lights and an elevator, but many rooms and machines would still lack power in a shut-off.

During the last outage, residents gathered at night in the central living room around a gas-lit fireplace and sang old-time songs and had s’mores, she said.

For people living paycheck to paycheck, losing a refrigerator’s worth of food during a power outage can have a huge impact, said Sara Olsher, a spokeswoman for the Redwood Empire Food Bank in Santa Rosa, the largest hunger relief organization for Sonoma County and coastal Northern California stretching to the Oregon border.

“The power shut-off was the real emergency, rather than the fire, for many people,” she said. Hourly employees at businesses that lost power were not able to work and lost several days’ pay, she said.

During and after October’s prolonged outage, some 25,000 additional people on top of the regular clientele of 14,000 a week visited the organization’s emergency distribution centers, where the food bank handed out less perishable foods such as canned tuna and chicken, peanut butter, bread, cereal and other items that didn’t need cooking.

The recipients “included a lot of people who had never been to a food bank before,” Olsher said.

The food bank set up 25 emergency distributions in 10 cities in October and was prepared to swing into extra action again if needed.

“We pride ourselves on our ability to act quickly and respond in the way we need to,” Olsher said.

Carolyn Said is a San Francisco Chronicle staff writer. Email: csaid@sfchronicle.com Twitter: @csaid