We consider an economy in which competitive firms use three technologies for electricity production: pollutive fossils, intermittent renewables whose availability varies continuously over time, and storage. A Pigouvian tax implements the first-best solution. This is also the case for an electricity consumption tax that is supplemented by subsidies for renewables and a tax on storage, but not for high shares of renewables in the energy mix. We then analyze second-best subsidies for renewables and storage capacities when carbon pricing is imperfect. The subsidy rate for renewables decreases as electricity production becomes less reliant on fossils. The storage subsidy is usually negative as long as fossils contribute to filling the storage, but turns positive (and remains constant for linear demand) thereafter. This is because more storage capacity reduces the price during times of destorage, but raises it when electricity is taken from the market to fill the storage. This has countervailing effects on firms' incentives to invest in fossil capacities, which are more pronounced for higher round-trip efficiency losses during a storage cycle. A numerical simulation illustrates that substantial subsidy payments are required even after fossils have been completely driven out of the market.