Office air conditioning should be set no lower than 27 Celsius (80.6 Fahrenheit) during the warmest months of the year, according to a government decree on energy efficiency.
Temperatures often rise above 40 Celsius in the summer across Spain.
During the winter offices, will not be heated beyond a maximum of 19 Celsius.
These measures will apply “whenever it is technically possible,” the decree said.
The decree includes greater use of working from home for civil servants, increased use of energy-efficient lighting and mass installation of solar panels on the roofs of public buildings.
The plan, part of an EU-wide effort to cut dependence on Russian gas and oil, calls for the installation of more bicycle parking spots at government office to encourage public workers to cycle to work.
The European Commission published plans on Tuesday to cut EU dependency on Russian gas by two-thirds this year and end its reliance on Russian supplies of the fuel before 2030.
Italy in April also announced plans to turn down air conditioning at public buildings to save energy this summer.