It works! I replaced the 12v adapter with 24v and connected ESP32 ground to the power adapters V- and I'm getting proper readings. Only replacing the adapter with 24v without connecting the grounds hasn't helped, so that appears to have been a critical step.
The output voltage measured by ESP32 behind the voltage divider sits at around 0,26v when the sensor is barley submerged and at around 1,19v when at 110cm depth. Not sure how accurate the readings will be, but I just need a rough water level to know when automatic irrigation is running out of water, so should be fine.
I created a lambda to transform the voltage to water level cm in ESPHome
I'm making something similar with a simple starters uno R3. Although my sketch is almost ready a can choose a other sensor and i'm interested in a RS485 sensor without any extra pcb. So my question: Does this sensor need to bee submerged at the bottom of the tank or well (measures water pressure?)?..i can't tell on the product web page. thx!
The sensor I'm using needs to be submerged, as it measures the pressure to which it is exposed.
I have seen other water level sensors that measure distance and they are not to be submerged, but placed at the top of the tank. The reason I haven't chosen one of those is that I have hoses and cables going down for the pump and I was afraid they would interfere with line of sight of the distance sensor. So I opted for the submergible type. They apparently also have a RS485 version. Can't say how durable they are, but mine looks pretty sturdy at first glance.