Trigger solenoid valve based on resistance
Figure 1. Extract from the datasheet.







simulate this circuit &ndash; Schematic created using CircuitLab

Figure 2. A sample circuit.

How it works:


The sensor has a series of resistors with reed switches connecting the nodes of the resistor chain to ground. The higher the float goes the more of the resistor chain is bypassed.
R5 controls the current into the resistor chain (R1 to R4). The maximum current will be about 12 mA from the 12 V supply.
With all switches open you'll have 240 &Omega; between A and GND. This along with R5 will form a potential divider so the voltage at A will vary from \$ \frac {240}{1000 + 240}12 \text V \$ when empty down to close to \$ \frac {33}{1000 + 240}12 \text V \$ when full.
R6 is potentiometer to set the trip point. By adjusting the wiper the level sensing threshold voltage, B,  can be adjusted across the same range as the sensor.
CMP1 is a comparator. If the sensor voltage goes above the threshold voltage the output, C, will be connected to GND by CMP1 and RLY1 will turn on.
D1 protects the comparator from the inductive kick-back of RLY1 when it is switched off.


If the logic of CMP1 is the reverse of what is required then swap the + and - inputs.

See my answer to https://electronics.stackexchange.com/a/483708/73158 for a similar design.