i´m new to the Rules business and i´ve built together a Waterlevel Sensor (HC-SR04) with an NodeMCU V3 Board and want to toggle a 1channel Relay when a certain Waterlevel has reached.
It´s for my Dog´s trinkin place

So for example his watter bowl is full and the distance betwenn the water and the sensor is 40cm, and he comes and drinks out of his bowl the waterlevel decreases to for example 20cm distance to the sensor, esp easy should toggle my relay to pump new water in the bowl. The relay should be toggled for about 20sec. to not overfill the bowl.
how do i write this rule? i´ve tried a lot but nothing works, as i´ve said i really ned your help because i´m new to the rules game here.
would be awesome if someone could help me out here!!
thanks a lot
Mike