There are atleast some restrictions in localities I.e. https://www.theguardian.com/world/article/2024/aug/12/portof... or parts of Portugal.
Also at a certain point if you ban or heavily restrict energy production to the point that no one can afford to run AC, it is a de facto ban.