How to set up an alert

I wanted Home assistant to alert my phone of the Main water tank has a leak. (Is emptying too fast for longer than 1/2 hr)