The easiest way to automatically close your smart valve when the Leak Sensor detects water is to use a home automation Hub like Wink, SmartThings, or Vera. The Hub will let you control and monitor devices from different manufacturers or even protocols (like WiFi, Z-Wave, Zigbee, etc.) so you can worry about what the devices should do, now how they are talking to each other.
After you configure your Smart Valve to appear in your home automation Hub, do the same with the Leak Sensor and create an automation rule to automatically shut off the valve when the Leak Sensor detects moisture. If you need more specific details, take a look at our how-to's page, or feel free to reach out to our support team.