code: def set(self, mode):
          
          new_mode = None
          if mode == ThermostatMode.OFF:
              new_mode = COMMAND_THERMOSTAT_CONTROL_OFF_ALL_0X6B_0X09
          elif mode == ThermostatMode.HEAT:
              new_mode = COMMAND_THERMOSTAT_CONTROL_ON_HEAT_0X6B_0X04
          elif mode == ThermostatMode.COOL:
              new_mode = COMMAND_THERMOSTAT_CONTROL_ON_COOL_0X6B_0X05
          elif mode == ThermostatMode.AUTO:
              new_mode = COMMAND_THERMOSTAT_CONTROL_ON_AUTO_0X6B_0X06
          if new_mode:
              msg = ExtendedSend(address=self._address,
                                 commandtuple=new_mode,
                                 userdata=Userdata())
              msg.set_checksum()
              self._send_method(msg, self._mode_change_ack)
docs: Set the thermostat mode.
  
          Mode optons:
              OFF = 0x00,
              HEAT = 0x01,
              COOL = 0x02,
              AUTO = 0x03,
              FAN_AUTO = 0x04,
              FAN_ALWAYS_ON = 0x8