Security experts Andrew Tierney and Ken Munro created a ransomware virus for smart thermostats. This was reported by Motherboard .

The British Tierney and Munro, working at the company Pen Test Partners, set themselves the task of proving the possibility of hacking “smart” thermostats in order to gain profit.
We don't really have much control over our devices; we don't know what they do or how they do it. And if they start behaving unpredictably, we don't have many ways to deal with the problem.
Andrew Tierney, security expert
Tierney and Munro demonstrated their solution at the Def Con hacker conference, held in early August in Las Vegas. Researchers used a bug in the firmware of a popular company's thermostat to install malware on it.
After this, the device raised the temperature in the room to maximum or minimum and displayed a requirement to transfer a certain amount to the burglars’ account in order to regain control.
Tierney and Munroe did not provide details of the hack or the thermostat model, as they first intend to transfer all the information they received to the manufacturing company. What is known is that the device has a large LCD screen and an SD card slot with the ability to load background images. In addition, the thermostat has Linux OS installed.
During their experiments, the researchers found that the device does not check the documents it opens, so it can easily be “fed” an executable file under the guise of an image. From this point on, the hacker has full remote control of the thermostat.
The most difficult part for hackers was to somehow force the owner to upload the desired file to the device. However, they do not rule out the possibility that this could be done through simple deception - by transferring a malicious file under the guise of new firmware or an image.
As Motherboard notes, network users fantasized about such a hacking scenario several years ago.
In addition, hacking the thermostat (and with it the entire “smart” home) was demonstrated in the second season of the TV series “Mr. Robot”.