Solar-cycle temperature variations in sunspots