def datastreams=(array)
      return unless array.is_a?(Array)
      @datastreams = []
      array.each do |datastream|
        if datastream.is_a?(Datastream)
          @datastreams << datastream
        elsif datastream.is_a?(Hash)
          #@datastreams << Datastream.new(datastream)
          @datastreams << XivelyConnector::Datastream.new(:device => self,
                                                          :data => datastream,
                                                          :datapoint_buffer_size => datapoint_buffer_size,
                                                          :only_save_changes => only_save_changes)
        end
      end
    end
def datastreams=(array)
      return unless array.is_a?(Array)
      @datastreams = []
      array.each do |datastream|
        if datastream.is_a?(Datastream)
          @datastreams << datastream
        elsif datastream.is_a?(Hash)
          #@datastreams << Datastream.new(datastream)
          @datastreams << XivelyConnector::Datastream.new(:device => self,
                                                          :data => datastream,
                                                          :datapoint_buffer_size => datapoint_buffer_size,
                                                          :only_save_changes => only_save_changes)
        end
      end
    end
Override the datastreams function so that it creates XivelyConnector::Datastreams which extend the standard one