Hybrid organic–inorganic perovskites (HOIPs) have gained substantial attention due to their excellent photovoltaic and optoelectronic properties.