Heat source unit for an air conditioner comprising a refrigerant circuit, the heat source unit comprising: an external housing accommodating: a compressor connectable to the refrigerant circuit; a heat source heat exchanger connectable to the refrigerant circuit and configured to exchange heat between a refrigerant circulating in the refrigerant circuit and a heat source; an electric box having a top and side walls (32 to 35), the electric box accommodating electrical components configured to control the air conditioner wherein the electric box has an air passage comprising an air inlet and an air outlet and configured so that an air flow is induced through the air passage from the air inlet to the air outlet for cooling at least some of the electrical components, wherein the heat source unit further comprises: a bypass line and a gas suction line; a cooling heat exchanger accommodated in the external housing and connectable to the refrigerant circuit, wherein the cooling heat exchanger is arranged so as to be flown through by the air flow and exchange heat between the refrigerant and the air flow, the cooling heat exchanger connected to the bypass line branched from a liquid refrigerant line and the gas suction line, wherein the bypass line has a valve upstream of the cooling heat exchanger; a controller configured to control the valve; a first temperature sensor accommodated within the external housing, wherein the controller is configured to control the valve on the basis of a temperature measured by the first temperature sensor. an external housing accommodating: a compressor connectable to the refrigerant circuit; a heat source heat exchanger connectable to the refrigerant circuit and configured to exchange heat between a refrigerant circulating in the refrigerant circuit and a heat source; an electric box having a top and side walls (32 to 35), the electric box accommodating electrical components configured to control the air conditioner wherein the electric box has an air passage comprising an air inlet and an air outlet and configured so that an air flow is induced through the air passage from the air inlet to the air outlet for cooling at least some of the electrical components, a compressor connectable to the refrigerant circuit; a heat source heat exchanger connectable to the refrigerant circuit and configured to exchange heat between a refrigerant circulating in the refrigerant circuit and a heat source; an electric box having a top and side walls (32 to 35), the electric box accommodating electrical components configured to control the air conditioner wherein the electric box has an air passage comprising an air inlet and an air outlet and configured so that an air flow is induced through the air passage from the air inlet to the air outlet for cooling at least some of the electrical components, wherein the heat source unit further comprises: a bypass line and a gas suction line; a cooling heat exchanger accommodated in the external housing and connectable to the refrigerant circuit, wherein the cooling heat exchanger is arranged so as to be flown through by the air flow and exchange heat between the refrigerant and the air flow, the cooling heat exchanger connected to the bypass line branched from a liquid refrigerant line and the gas suction line, wherein the bypass line has a valve upstream of the cooling heat exchanger; a controller configured to control the valve; a first temperature sensor accommodated within the external housing, wherein the controller is configured to control the valve on the basis of a temperature measured by the first temperature sensor.