Newbie Question Mark | Using a smart plug to set a “Charging Limit” for older Apple devices
In recent years, more and more digital device makers have started adding a “charging limit” feature to their systems. For example, starting with iOS 18, Apple brought a more granular charging limit setting to iPhone 15 and later models: in “Settings > Battery > Charging,” users can freely limit the charging cap between 80% and 100% in 5% increments. For those who keep their devices plugged in year-round, capping charging at 80% can theoretically slow battery degradation and reduce charge cycles.

Unfortunately, this feature currently has fairly strict hardware requirements. Apple explicitly limits support to newer models, such as iPhone 15 and later, iPad Air with M2 and later chips, iPad Pro with M4 and later chips, and iPad mini with A17 Pro and later chips.
For devices I’ve kept with a charging limit enabled long-term, after one or two years of use the battery health can still stay above 95%, and the protection effect is very obvious. That inevitably makes one wonder: for older iPhones or older iPads at home that aren’t on the support list, is there a way to get a similar “charging limit” feature?
After actually tinkering with this for a while, I found that implementing a charging limit on an older iPad is far more complicated than on an older Mac. Macs can rely on relatively open lower-level APIs and use third-party tools like AlDente to directly control charging and discharging; but iOS / iPadOS has strict sandboxing, and third-party apps simply have no permission to intervene with the underlying power management chip. Conventional chargers on the market also only guess the device’s battery level based on the fast-charging protocol voltage and cut off by themselves at 80%.
So in the end, I found that modifying things from the power supply side is the most convenient. I can use a Mijia smart plug together with an automation in Apple’s built-in “Shortcuts”: when the device charges to 80%, have the device actively call the plug to cut power; after the battery naturally drains, power it again.
This way, it’s a workaround, and older devices also get a “charging limit” feature.
Preparation
This setup has very low modification cost. In the early stage, you only need to prepare three things:
- One smart plug: any ordinary smart plug currently available on e-commerce platforms that supports connecting to Mijia, Apple Home, or other systems that can remotely turn power on and off will do. Mijia ones generally cost around thirty to forty yuan, so this article will use Mijia as an example;
- Device-side software: on the older iPhone or iPad whose charging you need to control, install the corresponding app, as well as the system’s built-in “Shortcuts” app;
- Basic network setup: first plug the smart plug into power and complete binding and network setup in the corresponding app, making sure the plug’s switch can be controlled normally through the phone.
Set up automations
Create control scenes in the Mijia app
First we need to create two basic control actions in the Mijia app: one responsible for cutting power, and one responsible for restoring power.
Create a scene
Open the Mijia app on the iPhone or iPad, switch to the “Smart” tab at the bottom, and tap “+” in the top right corner to create a new smart scene:
- For the trigger condition, select “Manual Control”;
- Under “Execute Action,” select “Home Devices” in order - find your “Smart Plug” - select “Turn Off Power”;
- Rename this scene to “Turn Off iPad Charging,” confirm it is correct, and tap “Save.”

After creating it, it is recommended to test it manually first: in the manual control list on the “Smart” page, find “Turn Off iPad Charging” and tap the triangle run button in the lower right corner of the card.
Following the same logic, create another scene to restore power, name it “Turn On iPad Charging,” and tap Save.

Add scenes to Siri shortcuts
Next, the scenes need to be synced to Siri so that Apple’s “Shortcuts” can call Mijia’s execution actions.
In the manual control area on the Mijia “Smart” page, find and tap the “Add to Siri” button. In the list that pops up, find the “Turn Off iPad Charging” and “Turn On iPad Charging” scenes you just created, and tap “Add to Siri.” After adding, these two scenes will automatically be registered in iOS as independent actions.

Configure automation rules in “Shortcuts”
Set up the “automatically cut power at 80% charge” rule
Next is to set up the automation in “Shortcuts.” In my previous tests, I found that after an iPhone or iPad locks and goes to sleep, Wi-Fi may automatically disconnect to save power. If the automation happens to trigger at that time, the power-off command can easily fail to send because the device isn’t connected to the network. So in Shortcuts, we also need to first add “Turn On Wi-Fi” and wait 5 seconds to connect to the network.

Open the “Shortcuts” app, switch to the “Automation” tab, and tap “+” in the top right corner to create a new personal automation:
- Set the trigger condition: select “Battery Level,” set it to “Above 79%,” and select “Run Immediately,” and turn off “Ask Before Running”;
- Wake up the network: add an action, search for and add “Set Wi-Fi,” and set it to “On”;
- Wait until ready: search for and add “Wait,” set the duration to 5 seconds, leaving time for the device to reconnect to Wi-Fi;
- Execute power-off: add “Run Shortcut” and select “Turn Off iPad Charging,” which was previously added to Siri;
- Extra safeguard: however, Mijia automation needs to rely on public network relay, so to prevent public network fluctuations from causing automation failure, you can add another “Wait 15 seconds” afterward, and then add “Run Shortcut: Turn Off iPad Charging” again as an extra safeguard.
After setting it up, you can turn on “Notify When Run” to make it easier to check the status while the screen is locked. Remember to tap into the details and confirm that “Run When Locked” is allowed. After saving for the first time, remember to manually tap Run once to allow Shortcuts to call Mijia’s permissions, avoiding getting stuck on an authorization prompt during background execution.
Set up the “automatically turn on the smart plug and stand by when battery drops to 75%” rule
Just being able to cut power isn’t enough. If the plug is turned off and left alone, the device will naturally drain power and then be unable to charge, so another rule needs to be added: when the battery drops below 75%, turn the plug back on.
The reason it is set to 75% rather than 79% here is to leave a 5% buffer. If the plug turns on as soon as the battery drops to 79%, and then turns off immediately after charging to 80%, I’m worried the plug will easily break.

The configuration method is similar to the above: create a new automation, and likewise select “Run Immediately”:
- Trigger condition: select “Battery Level,” set it to “Below 75%”;
- Turn on Wi-Fi and wait: first “Set Wi-Fi: On,” then add “Wait 5 seconds”;
- Execute power-on: add “Run Shortcut” and select “Turn On iPad Charging”;
- Extra safeguard: likewise add “Wait 15 seconds,” then run “Turn On iPad Charging” once more.
Likewise, confirm the permissions and manually test-run once to complete authorization.
Automatically cut power when the charger is plugged in while the device is above 80%
With the above two rules, it’s basically enough for daily use, but I often take the iPad out with me, so if it has already been charged to 85% or even higher elsewhere and I bring it home and plug it into this plug, because the battery hasn’t gone through the change of “rising from 79% to 80%,” the first power-off automation just now won’t trigger; if the plug happens to be on, it will keep charging to 100%.
So an additional rule needs to be set: check the current battery level, and if it is above 80%, cut power directly.
- Trigger condition: create a new automation, select “Charger” - “Is Connected,” and check “Run Immediately”;
- Read the current battery level: search for and add “Get Battery Level”;
- Add a judgment rule: add an “If” condition, set it to “Battery Level” “is greater than 79,” and just delete the unused “Otherwise”;
- Execute the power-off action: put the previous power-off operation between “If” and “End If,” that is, first turn on Wi-Fi, wait 5 seconds, and then run “Turn Off iPad Charging”;
- Extra safeguard: likewise add “Wait 15 seconds,” then run “Turn Off iPad Charging” once more.
Likewise, confirm the permissions and manually test-run once
Once the automation is set up, you don't have to think about it day to day, but there are always times when you're heading out of town the next day, or you want to temporarily charge to 100%. Still, for these one-off charging situations, opening the Mijia app to turn off the automation switch is a bit of a hassle, and afterwards you have to remember to turn the automation back on — and setting up an automation through Shortcuts is even more complicated.
So for these temporary situations, it's easiest to just switch to a different outlet to charge the iPad.
Finally
Once this setup is done, the charging limit for the old device is in place. It does mean an extra smart plug compared to the built-in "Charging Limit" in iPadOS, but thirty or forty yuan is still far cheaper than buying a new iPad, and you don't have to worry about battery swelling or degradation caused by being plugged in long-term.
Follow sspai on Xiaohongshu and experience a wonderful digital life 🍃
Genuine, practical and useful software, brought to you by sspai 🚀