0

It is common wisdom that Lithium-Ion batteries should not be left with 0% charge.

However, some users might not be aware of this common wisdom, or simply refuse to concern themselves about proper battery care. For example, an end-user may drain the battery to 0%, then put the computer away without putting it back on the charge. This rapidly diminishes the life of the battery.

Is there any app or setting that will force the computer to turn off when the battery charge is around 25%, to ensure that a healthy reserve is available and damage to the battery is avoided?

1

I haven't tested this, although something such as this should work:

property lowBattery : 25

on idle
    set battStatus to do shell script "pmset -g ps"
    if battStatus contains "InternalBattery" then
        set {TID, text item delimiters} to {text item delimiters, ";"}
        set battStatus to text items of battStatus
        set text item delimiters to space
        set battStatus to text 1 thru -2 of last text item of item 1 of battStatus as integer
        set text item delimiters to TID
        -- Shutdown if battery is less than 25%
        if battStatus < lowBattery then tell application "loginwindow" to «event aevtrsdn»
    end if
    return 60
end idle

In AppleScript editor save it as an Application using Stay open run handler, then add it to your Login Items under System Preferences > Users & Groups

1

I don't have any sources I can reference to support this claim, other than my experience with other systems that rely on lithium-ion batteries, but I would guess that the percentage charge that you see in the menu bar isn't the actual state-of-charge (SOC) of the battery. Apple has probably accounted for the fact that having a battery run to 0% SOC is hard on the battery, so when you see 3% indicated in the menu bar, the actual battery SOC might be 10 or 20%. The same thing might be true for 100% SOC (which is also hard on the battery).

I realize I'm not exactly answering your question, but I think Apple probably already has done the due diligence you're proposing to protect the life of the battery.

-1

Have a look at SleepOnLowBattery (“SOLB”):

https://www.tonymacx86.com/threads/release-sleeponlowbattery-solb.264785/

or

https://www.insanelymac.com/forum/topic/336414-release-sleeponlowbattery-%E2%80%9Csolb%E2%80%9D/

It's open source and you can adapt anything to your liking.

  • Welcome to Ask Different! We're trying to find the best answers and those answers will provide info as to why they're the best. Explain why you think the link you provided will answer the question. Answers should be self-contained so others can find them by using the search feature. Links can change and become outdated so we prefer the answers to not just be a link. See How to Answer on how to provide a quality answer. - From Review – fsb Jan 2 at 21:40

You must log in to answer this question.

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