The invention discloses an air conditioner and a control method, and belongs to the technical field of air conditioners. The air conditioner comprises a controller, a temperature sensor, an
electric control component and a capacity-variable compressor
assembly, wherein the
electric control component is arranged on an outdoor unit of the air conditioner. The capacity-variable compressor
assembly comprises a capacity-variable compressor. The air conditioner further comprises a heat-dissipating
pipe set, wherein the heat-dissipating
pipe set is connected to a
refrigerant circulation pipeline and used for conducting heat dissipation on the
electric control component. The controller is used for acquiring the outdoor environment temperature, controlling the capacity-variable compressor to work in a double-cylinder mode and controlling the flow of the
refrigerant flowing through the heat-dissipating
pipe set to be increased when the value of the outdoor environment temperature is greater than or equal to the preset temperature threshold. According to the air conditioner, the capacity-variable compressor and the heat-dissipating pipe set which is used for conducting heat dissipation on the electric control component are adopted, the operation
modes of the capacity-variable compressor are switched according to the
outdoor temperature conditions, the heat dissipation pipe set is controlled to conduct heat dissipation on the electric control component so as to enable the
refrigerant outputted by the compressor to meet the requirements for indoor heat exchange and heat dissipation of the electric control component, and therefore the overall operation energy efficiency of the air conditioner is improved.