A class of elliptic solutions to the star-triangle relation