Read the state of a 12v illuminated switch from an Arduino Uno
You are pretty much on track, resistor value is not really critical here, you can use 10K for both resistors, that will work fine.







simulate this circuit &ndash; Schematic created using CircuitLab

You can make a thevenin equivalent circuit for the open and closed switch situations, for the closed switch:







simulate this circuit

When you press the switch, you will be driving the base with around 1mA, that should make the transistor drive the 20K pullup low very comfortably (in this case, the transistor should be able to drive hfe*ib through the collector, which will be at least a hundred mA)

When you release the switch:







simulate this circuit

You connect the base to ground through 10Kohm, ensuring you turn off the transistor. Quite simple and effective.