1. Chose water level sensor:
a. output dry contact for OPEN/CLOSE singal.
b. output DC 0-5v analog voltage.
2. create a new automation:
water-level-control-output4-on (turn on relay)
-------------------------------------------
Trigger type: State
Entity: input-1
To: on
Actions:
Action type: Call service
Service: Switch:Switch: Turn on
+ Choose entity
water-level-control-output4-off (turn off relay)
------------------------------------------
Trigger type: State
Entity: input-1
To: off
Actions:
Action type: Call service
Service: Switch:Switch: Turn off
+ Choose entity
hi
good video
where can i find the 2nd sensor ?
regards
Hi,
Please share the code for the analog water level sensor in esphome with automatic control of one relay.

you can see this video tour, set analog input automatic control relay by Tuya app:
Hello, Can i connect the water float level sensor switch with KC868 Server ?
do i need to write any code ?
you can connect to analog input port. just config by esphome.
I have KC868 Server - want to connect the Water Level sensor (single wire) to it.
On KC868 Board we have port -- AGND , A0 , A1 , A2 A3
so my question is water sensor has only a single wire - how do I connect it and any config I need to do?
Water sensor link below:-
https://www.amazon.in/gp/product/B088R3H...UTF8&psc=1
i don't know the principle and output signal type. do you have some usage case about the water level sensor? or how to use it , whether have diagram?