Iterate over items in a set of dicts
In both nested loops, it seems you really need the values of dictionaries.
You iterate over the keys just to use them to get the values:


for ID in switch:
    for pin in switch[ID]:
        GPIO.setup(switch[ID][pin], GPIO.OUT)



A more direct approach would be to iterate over the values instead of the keys:

for pins in switch.values():
    for pin in pins.values():
        GPIO.setup(pin, GPIO.OUT)


A minor thing, the definition of switch doesn't follow PEP8,
because of the spaces around the = when setting the dictionary keywords.
This is the recommended style:

switch = {
    'A': dict(On=22, Off=12),
    'B': dict(On=19, Off=11),
    'C': dict(On=18, Off=16),
    'D': dict(On=15, Off=13)
}