We analyse the interaction between centralised carbon-emissive technologies and distributed non-emissive technologies. A representative consumer can satisfy her electricity demand by investing in solar panels and by buying power from a centralised firm. We consider the point of view of the consumer, the firm and a social planner, formulating suitable McKean-Vlasov control problems with stochastic coefficients. First, we provide explicit formulas for the production strategies which minimise the costs. Then, we look for an equilibrium price. Joint work...