Hi Steven
I looks like youneed a 3way switch at that location .. if the dimmer switch is not a 3way ,, then you need to exchange it for one that is ..
How many of the wires were connected to the old switch??
Thanks .. Rich
Home Improvement Enthusiast
Over 35 years construction and home maintenance experience