Triple-digit heat has broken records across the west.
CNN  — 

As California faces a record-breaking heat wave that is expected to last through Thursday, state officials have urged residents not to turn down the thermostat so as to conserve as much energy as possible.

The California Independent System Operator Corporation (ISO) issued a statewide Flex Alert, calling for voluntary electricity conservation from 4 p.m. to 10 p.m. on Tuesday. Residents were asked to turn off unnecessary lights and to keep thermostats to 78 degrees or higher as the temperature in some areas reached triple digits, the ISO said in a news release.

Such alerts are issued when “the electricity grid is under stress because of generation or transmission outages, or from persistent hot temperatures,” the ISO said. It expected widespread heat to drive energy demand to 42,800 megawatts on Tuesday.

Parts of California, including the cities of Indio, Palm Springs, Coachella and Palm Desert, are under an excessive heat warning through Wednesday night, with highs of 110 degrees to 113 degrees possible, according to the National Weather Service in San Diego.

A heat wave began sweeping through the state on Monday. New record temperatures were reached in areas including the San Francisco Bay, which has felt triple-digit heat for days, according to CNN meteorologist Michael Guy.

The heat wave will move north to Oregon on Wednesday and will ease up by Thursday, Guy said. But temperatures will stay up to 15 degrees above average through the middle of next week at least, he said.

The National Weather Service Hanford, in the south-central San Joaquin Valley, advised those in the area to avoid being outside on Wednesday, to stay in air conditioned spaces and to drink plenty of water.

As the hot weather has scorched California, the state also has been battling a wildfire. Firefighters have been facing down a fast-moving blaze northwest of Sacramento in Yolo County, California, that started Saturday and quickly spread. The Sand Fire had burned more than 2,500 acres as of Tuesday night and was 70% contained, according to Cal Fire.

CNN’s Theresa Waldrop contributed to this report.