This nut has three wires, the fan , the outlet and a pigtail to the switch.
remove the short pigtail and connect the other wires to the brass screws on the the duplex switch.
The black that is at the old switch goes to one of the black screws on the switch and the fan and outlet wires go to the brass screws.
remove the short pigtail and connect the other wires to the brass screws on the the duplex switch.
The black that is at the old switch goes to one of the black screws on the switch and the fan and outlet wires go to the brass screws.