The accurate detection of hazardous gases and monitoring of ambient temperature are crucial for preserving the ecological environment, safeguarding human health, and fostering industrial advancement. In this research, a straightforward hydrothermal technique was employed to synthesize the heterogeneous nanocomposite structure of CsPbBr3/SnWO4, which facilitates the detection of ethanolamine gas at room temperature. The synthesized CsPbBr3/SnWO4 heterostructures underwent further analysis using XRD, SEM, HRTEM, XPS, BET and Mott-Schottky techniques. The findings revealed that the CsPbBr3/SnWO4 heterostructure exhibits a coarse cubic morphology, consisting of nano-cubic CsPbBr3 and nano-sheet SnWO4. Additionally, the integration of CsPbBr3 markedly enhances the specific surface area of the pristine SnWO4 nanosheets. Due to its coarse surface, expansive contact area, and n-n heterojunction, CsPbBr3–SnWO4 demonstrates remarkable selectivity, superior long-term stability, and a sensitivity of 45.6 to ethanolamine at ambient temperature. In conclusion, the CsPbBr3/SnWO4 heterostructure, constructed from a cube with a rough surface, is anticipated to serve as an effective room temperature sensor with heightened selectivity for ethanolamine.