Added logic for handling the physical override button on the thermostat.
Also, switched to using deepcopy function in order to keep historical values.