It is narrated from Sayyiduna Zayd bin Khalid al-Juhani (may Allah be pleased with him); he said: We received rain along with the Messenger of Allah (peace and blessings be upon him) at al-Hudaybiyah. When morning came, the Prophet (peace and blessings be upon him) said: "Do you know what your Lord said?" We said: Allah and His Messenger know best. (He (peace and blessings be upon him) said this twice.) Then he said: "Today, of My servants, one has become a believer and one a disbeliever. Whoever said: We were given rain by the naw' (setting) of such-and-such a star, has disbelieved in Me and believed in the star; and whoever said: This is the mercy of Allah and His provision, has believed in Me and disbelieved in the star."
Hadith Referenceالمعجم الكبير للطبراني / باب الزاي / 5195