My nest boxes have never had house sparrow problems. They are definitely in the adjacent town but not in my rural area. So no experience with them.
I have read some reports of the use of fishing lines and they seem to work after nesting and laying has started. I can’t say if that technique will work before a pair adopt your nest box. This is a great question and I’m going to follow the replies with interest.
Look into mylar ribbons as well. Some success has been reported.
WI/MI Border, about 100 miles north of Green Bay