Ooo this is basically what I was just about to start trying to create myself! Or change another piston to do! Only difference is I was planning to have two devices randomly turned on at any given time and then randomly switched off, whereas this piston does it to one. I think I can achieve my aim by creating a ‘RandomDevice1’ and ‘RandomDevice2’ and getting the piston to check that the two are not the same light before executing the actions…
Will give it a go…