A close ancestor to the modern air conditioner units made in 1902, by an American engineer by the name of Willis Carrier. The machine at that time called "Apparatus for Treating Air" and built for the Sackett-Wilhelms Lithographing and Publishing Co. in Brooklyn, New York. Chilled coils used in machines to reduce air and lower humidity to 55%. Although the apparatus made with enough precision that the humidity level desired was adjustable. ("History of Air Conditioning")
The article explains how air conditioners started becoming a commercial product as it became increasingly in use for industrial purposes. The real breakthrough achieved when Carrier had the benign dielene together with a central compressor replacing the ammonia thus reducing the size of the unit. Willis Carrier's invention came late in the 1900s, but before that, several attempts to air conditioning existed.
In 180 AD, Ding Huan discovered the first ventilation system that was fan powered. The fan passed air from cold water and the air then spread in the house manually (Paventi). Later fountain water used to power the engine of the fan, thus reducing manual labor. Apart from the cooling effect of the water, the air became humid too (Paventi).
In 1820 Michael Faraday, a British scientist, made a compressor that used ammonia (Paventi). Exhaustion of the toxic ammonia fumes became difficult and thus the cooling effect was unsafe. However, up to date his compressing technology is still in use.