I reckon there might be a market for a combination of the two - a detector that activates a sprinkler for a few seconds... I'm confident that it'd deter the cat, but you might get a bit wet yourself when you wanted to sit under the pergola and forgot to deactivate the detector!
B&Q sell one for about £25. Look on youtube for 'scarecrow sprinkler' for lots of fun examples.