Only connect incandescent bulbs to dimmer switch 2 wire. One black was screwed into a red cable wire in the wall but the other black was screwed into two black wires coming out of the wall.

Replacing A Ceiling Fan Light With A Regular Light Fixture
Wiring a dimmer switch with 2 black wires. Connect the ground wire from your dimmer to a green or bare copper wire in the wall box. Notice the black wire is the only wire that we are controlling through the 2 way switch. Bulbs that include a power supply like led and cfl bulbs may emit a soft glow even when the switch is turned off. Hello i recently purchased a dimmer switch. The united states has strict codes relating to home wiring including clearly defined colors on the outer casing of the wires. Screw the dimmer to the box with the screws provided.
Black means hot white signifies neutral and green indicates ground. Red white black and green. You have an incoming hot wire black going to one screw it does not matter if you use the brass or silver screw on the side of the 2 way switch and a black wire from the other screw on the 2 way switch going to the load light ceiling fan etc. Remove 34 inch of casing from the end of the house wires and the dimmer switch wires if needed. I detached the old one and purchased a new one after capping the live wires of course. However if you need to rewire a light switch or a plug socket you may occasionally come across two black wires.
Finish the job by installing the cover plate and turning on the power to test the new dimmer. It doesnt matter if you reverse the two switch wires to a single pole dimmer. Fold the wires neatly into the box. Connect the black dimmer wire to your tagged common wire and remove the electrical tape. Twist the ends together clockwise and cap them using a wire connector nut. The old one had three wires coming out of the back of the switch.
Youll notice four colored wires. Dimmer switch 2 wire is able to avoid need of a neutral wire by completing an electrical circuit through the connected load. In some systems the green wire might be copper or brown. Two blacks and a green ground wire. If you dont have this circuit youll need to rewire with the standard red white black and green or brown. Next set up the three way dimmer switch wiring.