A battery energy storage plant that could power nearly 80,000 homes for two hours has been approved at Osgodby near Selby.