Another way would be Matrix(one(eltype(A))I, size(A,1), size(A,1)) I guess.
Matrix(one(eltype(A))I, size(A,1), size(A,1))