My house seems designed for such pranks, no smart things required. For some unfathomable reason the switch for the main bathroom is
outside the bathroom. If you are in the bathroom with the door closed anyone else can flip the switch and likely get clean away before you can get off the toilet and open the door.
I've heard of a great light flipping prank that supposedly happened at Caltech a few years before I was there. There was a row of rooms overlooking a courtyard. Each had a window on the courtyard. At the end of the row was a bathroom, also with a window on the courtyard.
Some pranksters once when the student in the room next to the bathroom was out rewired his switch and the bathroom switch so the each switch controlled both rooms.
Then they sat in the courtyard watching that night. He got home, they saw his light (and the bathroom light) go on as he got ready for bed, then go out as he went to sleep.
A little while later someone went to use the bathroom. They turned on both lights.
That woke the sleeping guy, who got up and turned the lights back off and went back to bad. The people in the courtyard heard an annoyed yell from the bathroom, where the occupant was apparently sitting on the toilet.
Toilet guy went and turned the lights back on. That woke up sleeping guy, who they heard swear, and he got up and turned the lights off.
Toilet guy as faster this time, and got the lights back on before sleeping guy reached bed.
What then happened was the lights alternated on and off at an increasing frequency until finally both people went out to the hall to try to see if there was a clue there and they figured out what was going on.