The original inventors of such technology are AC Propulsion [1] (coincidentally, the same company that Tesla licensed the early drivetrain for the roadster from). They referred to it as "vehicle-to-grid" (V2G) technology. Some interesting history in this idea - it's taken somebody like Elon Musk and a company like Tesla to start looking at implementing this technology in production/commodity markets.
[1] https://www.acpropulsion.com/products-v2g.html