Installing a low voltage pump to drain condensed water from a window air conditioner
Mixing AC mains and low voltage involves some very complicated rules, and it may be prohibitive to do this as an electronics design exercise, especially if (as you say) you don't really have the chops.
One option is don't even detect the air conditioner running. Detect water rising above a certain level in a reservoir.  Then, the project becomes a simple &quot;float switch&quot;: if water present, run pump.  Doing this allows you to build your entire project using 5 volt power only, and therefore the harsh rules on mixing AC power with low voltage will not come into play.
Note that having your common everyday &quot;wall wart&quot; convert AC power into 5 volts is perfectly legit, since the vast majority of such wall-warts are UL-Listed as safe in that application.
Another that comes to mind is a &quot;smart power strip&quot; used for controlling &quot;dust collectors&quot; in wood shops.  (when they see current flowing to the table saw, they turn on the dust collector socket).  You plug the air conditioner into the &quot;table saw&quot; socket, and the 5V wall-wart power supply into the &quot;dust collector&quot; socket.
They make the same kind of thing for PCs (when the PC turns on, turn on the monitor, USB hub, printer, etc.)  However, the &quot;wood shop&quot; units are actually rated for the heavy current of an air conditioner.