The Spanish government will eliminate the so-called "sun tax" on solar self-consumption as part of measures announced on Friday to ease electricity prices and support the energy transition.