Simplified code for basic function

Has structure to be developed
Deleted val variable
Merge pull request #1 from naimo/SimpleThermostat

Simple thermostat