He said to his muezzin on a rainy day, "When you say, 'I bear witness that Muhammad is the Messenger of Allah,' do not say, 'Come to prayer.' Say instead, 'Pray in your homes.'"It seemed the people found this objectionable, so he said, "One who is better than I has done this. The Friday prayer is an obligation, and I disliked sending you out to walk through the mud and rain."
حدثنا مسدد حدثنا إسمعيل أخبرني عبد الحميد صاحب الزيادي حدثنا عبد الله بن الحارث ابن عم محمد بن سيرين أن
لمؤذنه في يوم مطير إذا قلت أشهد أن محمدا رسول الله فلا تقل حي على الصلاة قل صلوا في بيوتكم فكأن الناس استنكروا ذلك فقال قد فعل ذا من هو خير مني إن الجمعة عزمة وإني كرهت أن أخرجكم فتمشون في الطين والمطر
Bukhari narrated it in Friday Prayer, chapter "Permission Not to Attend Friday Prayer in Rain," hadith 901, from Musaddad, and Muslim narrated it in Travelers' Prayer, chapter "Praying in One's Dwellings in Rain," hadith 699, from the hadith of Ismail bin Ulaya, through this same chain.