def _verify_coil_and_switch_fit(self, switch, coil):
        chain_serial, card, solenoid = coil.hw_driver.number.split('-')
        sw_chain_serial, sw_card, sw_num = switch.hw_switch.number.split('-')
        if self.min_version[chain_serial] >= 0x20000:
            if chain_serial != sw_chain_serial or card != sw_card:
                self.raise_config_error('Invalid switch being configured for driver. Driver = {} '
                                        'Switch = {}. Driver and switch have to be on the same '
                                        'board.'.format(coil.hw_driver.number, switch.hw_switch.number), 13)
        else:
            matching_sw = ((int(solenoid) & 0x0c) << 1) | (int(solenoid) & 0x03)
            if chain_serial != sw_chain_serial or card != sw_card or matching_sw != int(sw_num):
                self.raise_config_error('Invalid switch being configured for driver. Driver = {} '
                                        'Switch = {}. For Firmware < 0.2.0 they have to be on the same board and '
                                        'have the same number'.format(coil.hw_driver.number, switch.hw_switch.number),
                                        14)