def setSwitch(self, value):
        if self._Switch is not None:
            filtered = [x for x in self.Switch.SwitchPhases if x != self]
            self._Switch._SwitchPhases = filtered

        self._Switch = value
        if self._Switch is not None:
            if self not in self._Switch._SwitchPhases:
                self._Switch._SwitchPhases.append(self)