Update code.py to include a daemon thread for thermostat