COVID-19’s grip on the U.S. economy has sapped electricity demand at factories and offices — and Xcel Energy hasn’t been spared.

Still, Minneapolis-based Xcel notched a healthy increase in second-quarter profits as hot weather and cost cutting helped offset a 7% decline in its weather-adjusted electricity sales.

COVID-19 led to lockdowns and an economic contraction that sapped energy demand of all kinds. Earlier, this week the U.S. Energy Information Administration reported energy consumption, particularly oil, in April hit a low not seen in over 30 years. Electricity consumption in April hit a 19-year low.

Xcel is by far Minnesota’s largest electricity provider, and the company also has a big presence in Colorado as well as operations in New Mexico, Texas, Wisconsin the Dakotas and a small slice of Michigan’s Upper Peninsula.

“Because of Xcel’s size and locations, I usually consider it as a good barometer for the entire industry,” said Travis Miller, a stock analyst at Morningstar.

Xcel’s weather-adjusted residential electricity sales rose 5.4% in the second quarter as people worked at home instead of at the office. But that increase was more than canceled out by a 11.5% decline in commercial and industrial sales.

Still, hotter than normal weather — and a corresponding hike in power-sucking air conditioner use — helped cushion the decline in Xcel’s actual electricity sales.

Overall, Xcel “continued to put up solid numbers” during the second quarter, Miller said.

Xcel reported on Thursday earnings of $287 million, or 54 cents per share, up from $238 million, or 46 cents per share, in 2019’s second quarter. The company beat Wall Street forecast of 48 cents per share, with help from a lower effective tax rate during the quarter.

Xcel’s second-quarter revenue tallied $2.59 million, down a tad from a year ago, but below analysts’ projections of $2.66 billion.

“Despite lower sales due to COVID-19, Xcel Energy achieved strong second-quarter results primarily due to the positive impact of weather and cost-management efforts,” Ben Fowke, chairman and CEO of Xcel Energy, said in a statement. “We are on track with our financial plan and are reaffirming our 2020 earnings guidance of $2.73 to $2.83 per share.”

Xcel’s stock closed Thursday at $69, up 27 cents.

Fowke, in a conference call with analysts Thursday, said that Xcel has seen some improvement this month in sales of commercial and industrial electricity. “We are seeing a positive trend there.”

Fowke, in the analyst call, also noted the recent death of George Floyd at the hands of Minneapolis police.

He said that as the new chairman of the Edison Electric Institute, he has asked the trade group to “focus on what our industry can do to promote racial justice and increase our commitment to advance diversity and inclusion.”