Context. Radiation-driven mass loss is key to our understanding of massive-star evolution. However, for low-luminosity O-type stars there are big discrepancies between theoretically predicted and empirically derived mass-loss rates (called the weak-wind problem). Aims. We compute radiation-line-driven wind models of a typical weak-wind star to determine its temperature structure and the corresponding impact on ultra-violet (UV) line formation. Methods. We carried out hydrodynamic simulations of the line-deshadowing instability (LDI) for a weak-wind star in the Galaxy. Subsequently, we used this LDI model as input in a short-characteristics radiative transfer code to compute synthetic UV line profiles. Results. We find that the line-driven w...