Riyad as-Salihin, Book 18, Hadith 1731 (In-Book)

Zaid bin Khalid (May Allah be pleased with him) said: The Messenger of Allah led the Fajr prayer at Al-Hudaibiyyah after a rainfall during the night. At the conclusion of prayer, he turned towards the people and said, "Do you know what your Rubb has said?" They replied: "Allah and His Messenger know better." Upon this he remarked, "He has said: 'Some of My slaves have entered the morning as My believers and some as unbelievers. He who said: We have had a rainfall due to the Grace and Mercy of Allah, believes in Me and disbelieves in the stars; and he who said: We have had a rainfall due to the rising of such and such star, disbelieves in Me and affirms his faith in the stars."'[Al-Bukhari and Muslim].

عن زيد بن خالد رضي الله عنه قال‏:‏ صلى بنا رسول الله صلى الله عليه وسلم صلاة الصبح بالحديبية في أثر سماء كانت من الليل، فلما انصرف أقبل على الناس، فقال‏:‏ ‏"‏هل تدرون ماذا قال ربكم‏؟‏ ‏"‏ قالوا‏:‏ الله ورسوله أعلم‏.‏ قال‏:‏ قال‏:‏ ‏"‏أصبح من عبادي مؤمن بي وكافر بي ، فأما من قال‏:‏ مُطِرْنَا بفضل الله ورحمته، فذلك مؤمن بي كافر بالكواكب، وأما من قال‏:‏ مُطِرْنَا بنوء كذا وكذا، فذلك كافر بي مؤمن بالكواكب‏"‏ ‏(‏‏(‏متفق عليه‏)‏‏)‏‏.‏ والسماء هنا‏:‏ المطر‏‏‏.‏

sunnah.com