instance variables, for example a switch could have "doorid" as variable. Set it to the UID of the door you want it to open.
Then upon the event of the door to open
door-open-condition
door pick by unique ID = switch.doorid: open door
this way only the door with the fitting ID is opened.
If you need one switch to open more doors, use an array or give doors a specific switchID and then instead of picking by UID, pick doors by comparison door.switchid = switch.doorid
Edit: if you dislike using the UID, use the instance variables on both door and switch to connect them like I explained in the last part