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?