@user4286 until a HE offical driver is available, you can try this custom driver. Manually install the latest dev.branch version from the link in the first post. Then click on the Initialize() button and refresh the device web page. You should see deviceProfile : SONOFF_SWV_VALVE in the State Variables section:
Then, set the maximum irrigation time in the 'Set Irrigation Timer' command field and click on the button above. If this auto-off timer is exceeded (Close command is not sent), the valve should shut off automatically.