Whenever the night was cold or rainy, the Messenger of Allah ﷺ would order the caller to announce, "Pray in your dwellings."
حدثنا محمد بن عبيد حدثنا حماد بن زيد حدثنا أيوب عن نافع أن ابن عمر نزل بضجنان في ليلة باردة فأمر المنادي فنادى أن الصلاة في الرحال قال أيوب وحدثنا نافع
أن رسول الله ﷺ كان إذا كانت ليلة باردة أو مطيرة أمر المنادي فنادى الصلاة في الرحال
Its chain of transmission is sahih. Ibn Majah reported it in the Book of Establishing Prayer, chapter on praying in congregation on a rainy night, hadith 937, from the hadith of Ayub with this wording. It has other chains of transmission in Bukhari, hadith 666, and Muslim, hadith 697, and others.