Turning on random switch if "No Guests" switch is on and motion is detected

So, we’ve had 3 garages broken into this week in our neighbourhood and they are all holiday homes.

I’m trying to add a level of defence I once had on my SmartThings setup, to detect motion and then turn on random lights in the house for X amount of time.

Essentially my cameras give a binary_sensor.motion; I have a helper guests switch I use when guests aren’t present & I can turn on a defined switch. but turning off I read I may need to detect a state and restart the automation rather than it be in single, but I haven’t gotten that far.

How can I list a bunch of light switches (like master bedroom lights, hall way lights, bathroom light, sleepout lights etc) and randomly turn them on and off to make it look like someone is present in the house.

Any ideas for this soon to be template? :slight_smile:

There’s this for Appdaemon: