An air conditioner comprising: an indoor device; and an outdoor device connected to the indoor device, wherein the indoor device includes: an infrared sensor unit that has a plurality of thermal-image acquisition elements (33 1 to 33 n) and a sensor control unit that is configured to control the thermal-image acquisition elements (33 1 to 33 n), to scan a scanning area step by step to acquire thermal image data by the thermal-image acquisition elements (33 1 to 33 n) at each step, and to transmit the acquired thermal image data from the sensor control unit to outside, a sensor drive motor that moves the infrared sensor unit, and a control unit that is configured to determine whether an error has occurred in communication for each of the thermal-image acquisition elements (33 1 to 33 n), at a time of reception of the thermal image data transmitted from the infrared sensor unit, and to set the thermal-image acquisition element (33 1 to 33 n) whose sum of number of times of determination that an error has occurred in the communication is equal to or larger than a threshold as a communication-error established element, and not to acquire the thermal image data from the thermal-image acquisition element (33 1 to 33 n) set as the communication-error established element. an indoor device; and an outdoor device connected to the indoor device, wherein the indoor device includes: an infrared sensor unit that has a plurality of thermal-image acquisition elements (33 1 to 33 n) and a sensor control unit that is configured to control the thermal-image acquisition elements (33 1 to 33 n), to scan a scanning area step by step to acquire thermal image data by the thermal-image acquisition elements (33 1 to 33 n) at each step, and to transmit the acquired thermal image data from the sensor control unit to outside, a sensor drive motor that moves the infrared sensor unit, and a control unit that is configured to determine whether an error has occurred in communication for each of the thermal-image acquisition elements (33 1 to 33 n), at a time of reception of the thermal image data transmitted from the infrared sensor unit, and to set the thermal-image acquisition element (33 1 to 33 n) whose sum of number of times of determination that an error has occurred in the communication is equal to or larger than a threshold as a communication-error established element, and not to acquire the thermal image data from the thermal-image acquisition element (33 1 to 33 n) set as the communication-error established element. an infrared sensor unit that has a plurality of thermal-image acquisition elements (33 1 to 33 n) and a sensor control unit that is configured to control the thermal-image acquisition elements (33 1 to 33 n), to scan a scanning area step by step to acquire thermal image data by the thermal-image acquisition elements (33 1 to 33 n) at each step, and to transmit the acquired thermal image data from the sensor control unit to outside, a sensor drive motor that moves the infrared sensor unit, and a control unit that is configured to determine whether an error has occurred in communication for each of the thermal-image acquisition elements (33 1 to 33 n), at a time of reception of the thermal image data transmitted from the infrared sensor unit, and to set the thermal-image acquisition element (33 1 to 33 n) whose sum of number of times of determination that an error has occurred in the communication is equal to or larger than a threshold as a communication-error established element, and not to acquire the thermal image data from the thermal-image acquisition element (33 1 to 33 n) set as the communication-error established element.