Assuming you are a regular employee and were present and ready to do work during your contractually agreed working hours, you are entitled to your salary for that time, even if you could not actually do anything productive.
The fact that your work needs electricity is something the employer has to make sure is available, there is no way for a single employee to somehow change that.
This is part of what is called "Betriebsrisiko":
Der Arbeitgeber hat das Risiko der Unmöglichkeit der Arbeitsleistung aus im Betrieb liegenden Gründen schlechthin zu tragen und bleibt zur Lohnfortzahlung verpflichtet, auch wenn diese Gründe nicht betriebstechnische Störungsursachen haben oder auf einem Versagen der sachlichen oder persönlichen Mittel des Betriebes beruhen, sondern von außen auf das Unternehmen einwirken (BAG, 09.03.1983 - 4 AZR 301/80). Damit sind gerade die Ursachen angesprochen, die von außen auf typische Betriebsmittel (z. B. Maschinen, Fabrikgebäude, Heizungsanlagen) einwirken und sich für den Arbeitgeber als ein Fall der höheren Gewalt darstellen, z. B. Naturkatastrophen (Erdbeben, Überschwemmungen, Brände), Unglücksfälle sowie extreme Witterungsverhältnisse. In allen diesen Fällen hat der Arbeitgeber das Betriebsrisiko zu tragen (so BAG aaO, bestätigt durch BAG, 23.9.2015 - 5 AZR 146/14, Rn. 22).
The employer must bear the risk of the impossibility of work performance for reasons within the company and remains obligated to continue to pay wages, even if these reasons are not due to operational disruptions or are based on a failure of the material or personal resources of the company, but have an external effect on the company (BAG, 09.03.1983 - 4 AZR 301/80). This refers precisely to causes that affect typical operating resources (e.g. machines, factory buildings, heating systems) from the outside and present themselves to the employer as a case of force majeure, e.g. natural disasters (earthquakes, floods, fires), accidents and extreme weather conditions. In all these cases, the employer has to bear the operating risk (thus BAG loc.cit., confirmed by BAG, 23.9.2015 - 5 AZR 146/14, para. 22).
As an example, here is a court decision of such a case.
Please note that during a time when you cannot do your original job, assuming a normal employment contract that has the default clause "and other tasks as required by the employer" in it, your employer may ask you to do other tasks instead that day. As long as they are not dangerous, you may end up finally cleaning all your desks, watering the plants, cleaning the kitchen and sweeping the hallway. Maybe help by calling customers, landlines used to work without external electricity, maybe they still do. You get paid for working, you might be assigned other tasks.
Even if you get sent home early (lets say the heating broke and the repairman is only coming the next day), they still need to pay you for your regular working hours.
They do not need to pay you for overtime. Overtime is not something you can just "take", it needs to be accepted by both sides and obviously the company would never accept that you work "overtime" staring at walls doing nothing. So saying "oh, we cannot work today, great, today is the day I wanted to do 3 hours of overtime, pay up!" is not going to fly.
If they ask you, if you can stay longer than normal and work after the problem is solved, then obviously they need to pay overtime.
Please note that you still need to be available for work. You cannot just decide for yourself to not come in. If you leave without the company officially sending you home, you just left work and are absent. You will not be paid for that.