Switching the inverter on and off