I've got an external SSD connected to my Macbook pro M2 and I have keyboard maestro ejecting/mounting the drive based on which programs are open when going into sleep/closing lid.
But I've noticed that my Macbook tends to use about 5-10% percent of battery power when leaving the drive connected over a period of time while the mac is sleeping. The macros seem to work and the drive ejects when the Macbook enters sleep mode but the power keeps being drawn. Now I know that the simplest solution would be to simply unplug the drive when not in use but none of us are here for simple solutions.
Is there any way to disable power going to the ejected drive with a terminal command?
Of course I knew that. But if Windows is able to solve an electrical power draw issue, then probably macOS can to, and macOS may deal with it in a similar way. I called it a "lead" not a solution.
Great uncovery, tiffle (is that a word?) That reminds me, the pmset command has quite a few interesting features.
I think I remember once using "pmset schedule wake" command (in an infinite loop) to cause my computer to reboot after it experienced a blue screen of death.