Electrification with flexibility towards local energy decarbonization