After the device side detecting the presence of water and reporting it, and when the local water detector disappears, only the device side report the water detector status as false can the alarm be ended. You can start the virtual device simulation to verify this function on hardware development column of the IoT platform .