Was specifically speaking about Commiefornia. Other states have different rules/regs as you observed. Friends who are still stuck there lament about the Solar rules that preclude them from storing energy (batteries) and excess that goes to the grid but is not compensated.
So Cal Edison has net metering for solar. The meter runs backwards when producing more than you use. If you produce more than you use during a billing cycle, you will get a credit on your account.
Any remaining credit is settled up at the end of the year. My understanding is that payout on a credit is limited to a certain amount. Beyond that limit, you are compensated at a greatly reduced rate. So the incentive is to match your expected usage and not become a producer for profit.
As to energy storage, while I don't know the rules in detail, whatever they are they don't preclude storage solutions. In fact, So Cal Edison has a special tariff for electric cars and storage systems at greatly reduced rates.