Not necessarily. There are other operating systems and frameworks for embedded devices. Especially for commercial products. It doesn’t have to be something like Linux and GPL code.
This is a list of many other choices with many of them having non-copyleft licenses. And a thermostat is a comparatively simple device. They could also have implemented most things themselves and just taken a network-stack to connect it to the outside world. (I think network is something that is very complex and companies just buy a solution instead of writing all of that code.)