Abdullah bin Harith reported,

Ibn Abbas delivered a sermon to us on a muddy, rainy day. When the muezzin reached, "Come to prayer," he ordered him to call out instead, "Pray in your dwellings." The people looked at one another in surprise, so he said, "One who was better than me did this, and it is a binding directive."

Azami 2376

Sahih

عن عبد الله بن الحارث قال

خطبنا ابن عباس في يوم ردغ فلما بلغ المؤذن: حي على الصلاة فأمره أن ينادي: الصلاة في الرحال، فنظر القوم بعضهم إلى بعض فقال: فعل هذا من هو خير منه، وإنها عزمة.

الأعظمي 2376صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Prayer
Chapter
Congregational prayer
Section
Permission to leave the congregational prayer due to rain or excuse
Numbering
Jami al-Kamil 2376 (2nd edition)
Azami 2376