Rain gauges aren't anything new or high-tech, but this video does a great job showing how you can build your own using a 3D printed model, and use a ZigBee sensor to relay this data to Home Assistant. But the concept is so simple, you could easily use a Z-Wave/X10 DS10A door contact, and the concept should work with your favorite home automation application.
More details about the design can be found on his website.
More details about the design can be found on his website.