Electrothermal cooling and reversible electric heating