The government said the changes could reduce gas and oil demand by 5% in the short term.
Not all government leaders agreed with the guidelines. Isabel Diaz Ayuso, Madrid Regional Manager, posted on Twitter on Monday that Madrid would not comply.
She added: “It generates insecurity and scares away tourism and consumption”.
Many European countries have long been resistant to air conditioning, tending to view it as environmentally unfriendly and unnecessary. It is rarely found in homes, but is more common in public spaces.
Yet each successive heat wave creates more demand for air conditioning, and experts have predicted that demand will only increase, in part due to climate change. The International Energy Agency predicted in 2018 that global demand could more than triple by 2050.