Rain gauge? ESPHome

Are you married to an ESPhome solution? I was looking for a rain gauge too and found this, using a $10 gauge and a open/close sensor. Works well!