We prove decay and scattering of solutions of the nonlinear Schrödinger equation (NLS) in R with pure power nonlinearity with exponent 3 < p < 5 when the initial datum is small in Σ (bounded energy and variance) in the presence of a linear inhomogeneity represented by a linear potential that is a real-valued Schwarz function. We assume absence of discrete modes. The proof is analogous to the one for the translation-invariant equation. In particular, we find appropriate operators commuting with the linearization.