Is it possible to detect a connected USB-C charger cable that is not charging?

I mean a fully functional MacBook and a charger that is connected to a power outlet, where power is disabled. I would like to do it either by some OS (userspace functionality) or information if that would be possible programatically.

I'm using MacBook Pro (15-inch, 2018), macOS 10.14.6.

  • The battery indicator in the menu bar shows if the machine is charging or not. Is that what you need? – Thorbjørn Ravn Andersen Jul 30 at 8:18
  • @ThorbjørnRavnAndersen I'm interesting in deceting it programatically (using either some software designed to watch for it or using OS-level APIs). – syntagma Jul 30 at 8:24
  • What do you want to actually do? – Thorbjørn Ravn Andersen Jul 30 at 8:26
  • @ThorbjørnRavnAndersen for example show notification that USB-C charging cable is connected but doesn't charge the computer. – syntagma Jul 30 at 8:37
  • I do not know if a cable connected to an unpowerered charger can be detected by the hardware. If not, then no software can help. – Thorbjørn Ravn Andersen Jul 30 at 8:39

In about this Mac, overview -> System Report -> Power, last block displays connected and charging info. Cannot comment on programmatically retrieving.

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .