Ibn Awn, whom I believe traced this back to the Prophet ﷺ, reported that he ordered an announcer to call out on a rainy day, "Pray in your dwellings."
حدثنا ابن أبي عدي عن ابن عون عن محمد أن
ابن عون أظنه قد رفعه قال أمر مناديا فنادى في يوم مطير أن صلوا في رحالكم
Its isnad is sahih. Muhammad is Ibn Sirin. The hadith is abridged, and Abu Dawud narrated it at 1:411-412 at length, from the narration of Abdullah bin Harith, the cousin of Muhammad bin Sirin, from Ibn Abbas, as a marfu report.Munziri said, Bukhari, Muslim, and Ibn Majah also narrated it. See Muntaqa 1409.