Endesa SA, the Spanish unit of Italy’s Enel SpA, and Nissan Motor Co. agreed to work together to develop technology that will allow owners of electric cars to supply their homes with power or sell unused energy to the grid. The technology enables the energy stored in electric vehicles to be used for powering homes or sold to the grid, Endesa said in a statement on its website. The companies will work together to bring the systems to market.