added setting for user agent rather than putting it in every call
support for setting the mode of the thermostat (heat/cool/range)
support for multiple thermostats, including accessing them by name
cleaned up patterns a little bit