def __init__(self, machine, name, config, collection=None, validate=True):
        config['number_str'] = str(config['number']).upper()

        super(MatrixLight, self).__init__(machine, name, config, collection,
                                          platform_section='matrix_lights',
                                          validate=validate)

        self.hw_driver, self.number = (
            self.platform.configure_matrixlight(self.config))

        self.registered_handlers = []

        self.state = {  # current state of this light
                        'brightness': 0,
                        'priority': 0}

        self.cache = {  # cached state of last manual command
                        'brightness': 0,
                        'priority': 0}

        # set up the X, Y coordinates
        self.x = None
        self.y = None

        if 'x' in config:
            self.x = config['x']

        if config in 'y':
            self.y = config['y']
dataset/ETHPy150Open missionpinball/mpf/mpf/devices/matrix_light.py/MatrixLight.__init__/swapped operands of `in`