Simulated device script for Water Leak Sensor

Based on your comment in another thread, it appears that no one has ever given you the link to the FAQ on using custom code. Read that, and hopefully it will help clear up the confusion.