I'd think if you have the same symptoms with 2 switches most likely you've got the wiring wrong, but the rheostat part of the switch for dash/dome lights may be bad OR your switch isn't tight enough to be getting a good ground [fresh paint job?] - there are 2 connections for the dome light, the "D" hot terminal and the ground terminal, which supplies the ground [from the switches dash contact] thru the rheostat
Bill