Modify Ridiculously Automated Garage Door to only shut when a combination of people leave

I would like to modify the Ridiculously Automated Garage Door SmartApp to only close when a combination of people leave. For example, if I am the only one to leave I do not want it to close, however, if both myself and my wife leave I would want it to close. This would be independent of what my daughters presence state is. I see in the code where it detects “carPresence” but am uncertain how to modify the else statement to look for two users not “any” user. If this isn’t a possibility, how can I set/code it to close the garage door if everyone leaves - but not until the last user has left? Thanks!

I figured out a way to accomplish this. I utilized the Bon Voyage code as a starting point and then modified the “take action” part to use the “close garage door” code from the Ridiculously Automate Garage Door app. That allowed me to select which users, as a collective, to trigger the garage door to close upon leaving. Works great!

Can you share your code? I have tried to use Ridiculously Automated Garage Door, and it doesn’t work well. What you’re explaining seems like it would be perfect for my needs.