Water sensor for sump pump

I’m looking for some way to have a sensor in my sump pump that will report to home assistant so I can generate a notification if the water level goes above the maximum for the pump. I did some searching around and have only found people talking about having sensors on the outlets that their pumps are plugged into to monitor when they are running or not. Can anyone give me any ideas or suggestions on how I can accomplish this?

You can probably attach a water sensor to the sump above or at the max level for the pump.

That’s what I’m wanting, yes. Any suggestions on what water sensor I should use that will integrate with Home Assistant nicely?

If you use Z-Wave the following will work.

Used a very simple moisture sensor in this project:

That’s really cool, but I think that’s more work than I’m willing to put in for this project. I do like that it reports the battery level and everything though. I’ll have to think about it, no rush I guess. Thanks!

I like that this is a nice simple solution. I wish it had some kind of power adapter so it didn’t rely entirely on the battery though. I may end up going with this since I like the brand it’s not as complicated.

I use these:

It’s Zwave, so the battery level will be an attribute exposed in HA. Just automate the checking of it and have it send you a notification when the battery level reaches 10-15%.

Really? I’ve been meaning to get into Z-Wave. Looks like this would be a good opportunity to give it a shot. I’ll have to look around for some guides on how to check the battery level.

Once added to HA, it should be listed as an Attribute in your /dev-state

Typically, you can make a sensor out of an attribute with a template sensor like so:

#   Fusion Fuel Level
       unit_of_measurement: "%"
       value_template: '{{ states.device_tracker.ford_fusion.attributes.fuel_level }}'

This would create a sensor called sensor.fusion_fuel.

If you’re in the US you can get a Utilitech flood sensor from Lowe’s for $30. It’s stocked in their stores and marketed as a “Works with Iris” device for the Lowe’s automation ecosystem, but it’s just a z-wave moisture sensor. It even comes with some adhesive wire holders you can use to anchor the sensor lead to the sump pump pipe so it stays in position.

I have one in my basement sump pit and it works fine with HA, at least as tested – no overflows!

If you are a little handy with soldering, you can make your own for just around $5 using a Wemos D1 Mini/ESP8266. For $5 more, you can include a sensor that will monitor the electrical current and monitor when the sump pump runs. Here’s a link to my blog post on how you can set all that up:

Let me know if you have any questions about it.


Hi There

on your recommendation, i purchased one would you be so kind as to post your code

thank you in advance


Oh, sure. There’s not really not much “code” to speak of, but in my case (using a z-wave USB stick) the sensor returns a numeric value of 0 (dry) or 255 (wet). So I just turn it into a binary_sensor via a threshold – so any non-zero value will trigger it:

  - platform: threshold
    entity_id: sensor.everspring_st812_flood_detector_flood
    threshold: 1
    type: upper
    name: Sump Pump
    device_class: moisture

And then I use the ‘alert’ component to send notifications every 30 minutes if it’s triggered:

    name: Sump Pump Moisture Sensor is WET
    done_message: Sump Pump Moisture Sensor is OK
    entity_id: binary_sensor.sump_pump
    state: 'on'
    repeat: 30
    can_acknowledge: true
    skip_first: false
      - pushover
      - sms

If you’re using Wink I’m not sure how this may differ in your case. The ‘alert’ should be fine, but I don’t know what Wink does to handle z-wave sensors, so you might already have a binary_sensor to work with after you pair the sensor.

After having my sensor operating for six months or more, my battery level still shows “100%,” so I’m definitely happy with that.

Hi there

thanks so much for the code i’m a total newbie with HA let alone zwave lol

added the code I get a sensor of sump pump dry and when I add to water still stays dry but if I click on the sensor

says the value is 255 until I take out of the water any idea what I did wrong???

Seems to be working right but doesn’t change to wet

FYI using a Z stick not wink

thanks again


Thanks for the circuit diagram and the code…perfect, exactly what i have been looking all over this forum

does this go in your config.yaml?


Yes, although these days I’m using the iPhone app push notifications instead of Pushover and sms.