Using AC switched outlet to determine Receiver on/off state

I have an Uno R3 and an old Yamaha audio receiver. The receiver has an AC outlet on the back that powers up when you turn on the receiver (i.e., a "switched" outlet).

I want to plug a 5v "wall wart" into the switched outlet and pin that in directly to the Uno. The positive lead from the wall wart would go to pin 8 on the Uno and the negative to GND on the Uno.

Of course I would specify "pinmode(OnOffState,INPUT);"

My question is: Are any resistors necessary for this arrangement? Is there an easier way?

Thank you.

Rusty

Just to be sure the Arduino's input pin doesn't "float-up" when the power supply is off, I'd add a resistor in parallel with the power supply's output. But, depending on the power supply's design, it may not be necessary. A resistor will also help to discharge the power supply's capacitors so the 5V doesn't remain too long after power is turned-off. (I'm thinking something like 1K - 10K).

Make sure the wall wart is regulated (most 5V power supplies are). If it's not regulated, it could go over 5V with this light load and that could damage your Arduino.

If it was me, I'd use a relay (with a coil rated for your power line voltage). But, then I'd have to "package" the thing so your idea is simpler. (And, I always like simple!)