Connect the blue wire to the red wire.
Can you wire a ceiling fan to a dimmer switch.
To do this method the wire from your wall circuit to your light has to have 3 wires.
If you replace with a blank plate wire nut the black from supply to this black and again cap the red.
With a situation such as this it would be best to have a separate 3 wire cable from each ceiling fan to the switch box just in case the desired method of control will be changed.
These typically require you to leave the white neutral wires in the switch box undisturbed and connect.
A dimmer switch for the lights will be available in several watt sizes.
An example of this is that the motor in your fan could be damaged and rendered useless.
You can install a ceiling fan light dual dimmer switch to operate the fan speed and light intensity from the original wall switch location.
If you replace with a plain switch switch the black wire up to the fan and cap off the red wire on both ends.
Your power supply line the black wire should be feeding both switches and those switches power the fan black or the light blue.
A broken ceiling fan motor and a house fire are obviously not ideal outcomes however there is some good news.
Connect black fan wire to the black ceiling wire.
By all means you can connect a ceiling fan directly to a dimmer switch but you may run into problems along the way.
If it s more than just a dimmer you might keep it in a box for if you can use it later.