How to Prevent iPhone from Shutting Down Overnight Without Replacing Battery

automationbatterychargingiphonereboot

I have been dealing with an issue for a few months now and I have debugged it enough to be pretty confident that I know the cause.

  • The problem: Occasionally, my 8am personal automation does not run.
  • 1st clue: When this happens, there's always a notification on the lock screen that says something like "Automations will run once iPhone is unlocked"
  • 1st order reason: The phone rebooted. Any automations that would happen between shutdown and the next unlock will not run. This is how the iPhone is designed to behave.

Once I realized that the iPhone was unexpectedly shutting down overnight, maybe once or twice a week (and only overnight), I started debugging to figure out why that was happening. The next time it happened, I noted that the battery health graph showed the pause symbol under it, and an absence of battery bars suggested that the iPhone was shutting down around 3am when the battery is charged to between 80 and 100%. I checked this for multiple occurrences.

I learned that this could possibly be due to optimized charging, so I turned optimized charging off – but the problem persisted.

After speaking with Apple Support, I was informed that this shutdown (during AI-learned periods of inactivity) is also designed behavior after the battery has reached a certain level of "degraded performance". In my case, the max capacity is 83% and has been through over 500 charge cycles.

I have a reason^ for not wanting to replace the battery, so my question is: How do I prevent the AI from shutting down my phone overnight? My first hunch is perhaps a personal automation that disrupts the pattern the AI has discerned about my usage.

Footnote:

^ I'm satisfied with current battery performance and I feel like the phone has a reasonable amount of life left. I only have empirical evidence to support this (i.e. I don't know what actually goes into the max capacity calculation), but I suspect that the max capacity estimate is based (at least partially) on battery drain behavior and that that is artificially poor due to a problem immediately apparent after update to iOS 16. The phone occasionally gets hot and when this happens, whatever it's doing tanks the battery in under an hour. I suspect that there is an errant process/state, possibly due to an app or 2 that needs an update to be better compatible with iOS 16 (which I have discerned through my interactions online with others who have experience this issue and from discussions with Apple Support about the hotness issue). If I do nothing once the hotness starts, the phone will drain its battery and become extremely hot, and be dead in under an hour. But if I reboot the phone, it cools down and lasts for hours longer. In short, I believe this is primarily a software issue, and this behavior makes the battery graph look like the battery is in poorer health than it really is. No doubt, the battery has seen better days and could be "solved" by a battery replacement, but if I reboot the phone when these "hot flashes" occur (maybe once a week or so), the overall battery performance is pretty good, TBH. No significant complaints – minor just annoyances.

Best Answer

It took me about a week or so of trial and error, but I eventually got an automation that seems to prevent the reboot. It's impossible to prove a negative, but it has been 2-3 weeks now and there have been no shutdowns. Normally in that time, I would wake up to the message saying that automations would resume after the phone is unlocked between 3-6 times.

I created 2 automations:

  1. When the battery level rises above 95%, turn off the smart outlet (that the charger is plugged into).
  2. When the battery level falls below 90%, turn the smart outlet on.

That's the gist, anyway. I added some logic to only ever turn off the outlet between 12am and 8am. My automations that I want to run are at 8am, so I added another automation at 8:05am to turn the outlet on (so it would charge to 100%).

Note, I'd wanted the active period to be between 10pm and 8am, but I couldn't figure out a simple rule to do that. When I tried it, it would never trigger because both times defaulted to "today", and that was the opposite time period I wanted.

I also added a few automations to turn the outlet on so that it would be on when I went to bed. Still need to tweak that some more for it to be reliable.