Rewire wall switch to an on/off switch, for a ceiling fan that has nightlight, fan & lights?
Reference the UC9031 installation instructions (PDF).  Your picture shows:



And the backside of that model:


Is there another wirenut not shown?  Otherwise, there is no separate connection for the nightlight.

In order to be able to switch off everything at the wall you will need:


Short length of #12 or #14 wire for pigtail(s).
Larger wirenut sufficient for joining 4 wires. Those yellow nuts are not big enough.


The new switch should be wired like:




Make sure power is off and consult an electrician if you're unsure about anything.
Label all the wires from the wall before disconnecting the old switch.
Leave the neutral alone.
Wire the fan, light, a 6 to 8 inch pigtail, and the nightlight wire (if any) together.
Connect the other end of the pigtail to the switch as shown.