Automatic urinal valve