Detect a connected USB-C charger cable that is not charging
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.
In about this Mac, overview -> System Report -> Power, last block displays connected and charging info. Cannot comment on programmatically retrieving.