Look for a product called Flip-a-Switch. It's a small module that fits in the fan's ceiling canopy and is wired between the house circuit and the fan circuit. It counts on/off pulses to control the fan. Turn switch on and you get fan-only; off/on is lights-only; off/on again is fan and lights; off/on again is lights-only but dimmed. Works equally well with three-way switches since it's only counting off/on sequences. I have three of them in my house where I couldn't easily get to the existing wiring.