NEW YORK — Google Inc. will pay $3.2 billion to buy Nest Labs, which develops high-tech versions of devices like thermostats and smoke detectors, in its second most expensive acquisition ever.
The search engine operator was an early investor in Nest Labs. It says the company’s Nest Learning Thermostat has been a ‘‘consistent best-seller.’’
The thermostat, which retails for $249, is designed to learn how inhabitants like their homes to be heated and cooled. Once it learns the consumers’ preferences, it automatically adjusts the temperature.
The Nest Protect alarm is intended to be less annoying than traditional alarms: When it detects smoke or carbon monoxide, it lights up yellow and speaks with a human voice, giving consumers an option to turn the device off if there is no emergency.
Analyst Shyam Patil of Wedbush Securities said Google is positioning itself to offer products that work on the ‘‘Internet of Things’’ — specifically a ‘‘connected home’’ full of intelligent wireless devices that collect data and could be controlled with a smartphone.
Last year, Google introduced Chromecast, a device that lets users connect their TVs and mobile devices.