We consider an economy in which competitive firms use three technologies for electricity production: pollutive fossils, intermittent renewables like wind or solar, and storage. We determine optimal subsidies for renewables and storage capacities when carbon pricing is imperfect. This policy is efficient for low market shares of intermittent renewables in the energy system, but it turns inefficient once there are sufficient renewables to partly displace fossil electricity production at times of high availability. Moreover, the subsidy scheme is substantially more complex than a first-best Pigouvian tax. The optimal renewable subsidy is always positive but tends to decrease as electricity production becomes less reliant on fossils. The optimal storage subsidy even changes its sign. It is usually negative as long as fossils contribute to filling the storage, but turns positive if fossils are used only during times of low availability of renewables. 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, and these effects are more pronounced the higher the round-trip efficiency losses during a storage cycle.