I heard that the sin of Sodom and Gomorrah was a sin against hospitality. Is this true?

There is nothing in Genesis 18 or 19 which could support the theory that a lack of hospitality was the crime that caused God to annihilate Sodom and Gomorrah. In Genesis 18 God said, "The outcry against Sodom and Gomorrah is so great, and their sin [singular] is so grave..." (v.20). What was the sin which "cried out" for punishment?

Genesis 19 recounts the story of how Abraham's nephew, Lot, entertained two angels at his home in Sodom. Word got around that Lot had some visiting men in his home, and "the townsmen of Sodom, both young and old," gathered outside his home, clamoring for the two visitors to be turned over so that they could be homosexually raped: "Where are the men who came to your house tonight? Bring them out to us that we might have intimacies with them."

Notice what's going on here. The strangers had been shown hospitality by Lot and his family (vv. 1-3). The townsmen didn't cry out to Lot that they wanted to be "inhospitable" to the visitors, but that they wanted to have intercourse with them, which is something markedly different. Lot attempts to quell the mob by offering them his two virgin daughters, suspecting that because these men were homosexuals they would refuse. The entire account revolves around a single sin: homosexuality.