In addition to the remark on declaring sensor to Domoticz, the sketch itself seems to me a bit confusing.
Normally, you should do setup into setup function (stuff like pin mode, even eventually reading saved config and setting relay in correct state), presentation should contain only sendsketchinfo() & present(), loop should do the repetitive job.
You should avoid blocking the loop, especially if you want to receive messages (as you did).
You're using relay from pin 2 to 6 but sensor 1 to 5, but when receiving an order to set sensor x, you set pin x (instead of x+1). Result may not exactly be what you want/imagine.
You're turning pump off only when receiving a message (as the test is done here), instead in the loop.
You're using digitalWrite() on some analog pin (A1)
You're sending udpdates every 2 seconds, while sending either changes or data at larger interval may fit better.
In addition, you may also want to simplify:
send(msgNEPA.set(sensorState?"0":"0")) by send(msgNEPA.set(0)) (in addition, this will send numeric value instead of string, don't think that sending a string is what you want)
and
send(msgNEPA.set(sensorState?"1":"1")) by send(msgNEPA.set(1))
May I suggest you explain what you have, and what you want to do, for us to guide you setting the sensors properly?