My thoughts exactly on using ESPHome.
My familiarity with float switches is limited to boats. Any you would recommend for this application?
My familiarity with float switches is limited to boats. Any you would recommend for this application?
I just noticed that you're using a mains-powered pump, so don't splice its wires directly. Instead, insert the float switch on one of the wires between the QT Py and the relay.
Something like this: https://www.supplyhouse.com/Beckett-Pumps-1502UR-Float-Safet...
or
https://www.supplyhouse.com/Little-Giant-599124-ACS-3-Auxili...