BOSTON — A bill designed to continue encouraging homeowners, municipalities and others to increase the use of solar power in Massachusetts is on Republican Gov. Charlie Baker's desk awaiting his signature.

The Massachusetts House and Senate gave final approval to the bill Thursday, shipping it to Baker.

The bill raises caps on the state's net metering program, which allows homeowners, solar developers and municipal governments to sell excess power they generate back to the electrical grid in exchange for credit.

Solar power activists and municipal officials have pushed to raise the caps. Existing caps have been reached in much of the state and some larger solar projects have stalled.

Renewable energy advocates have offered lukewarm support for the bill, calling it a short term fix and saying the caps will need to be raised again.