Xiaomi water sensor change the value On Off constantly

Hello guys, i bought a xiaomi water sensor, and i paired it with my gateway.
After that when i put it on my HomeAssistant, the value of sensor change On to OFF constantly, and if it is ON when i restart the homeassistant it goes to off.

anyone had the same issue?