What should I do about water dripping into my smoke detector from the attic after a heavy rain?
I left it off for a time, and did not notice any more water coming from the opening in the ceiling


I'll bet there's cold air from the attic coming through that hole, mixing with warm air in the living areas in your house and causing condensation to build up in the smoke detector.

You should seal that hole (a) to prevent cold air from moving down, and (b) to prevent any smoky air (should you be unfortunate enough to have any) from being pulled up through it (a process known as the Stack Effect , which can reduce the effectiveness of smoke detectors.