Using Shortcuts to limit the charging of older iPads

I have been playing with Shortcuts to limit the charge level of my iPad to around 80%. I am not sure if it makes a difference to battery service life but I thought I would get some practice with Shortcuts.
The trick is to create a Personal Shortcut and have it detect when the iPad charge rises above a certain level then turn off the Homekit power outlet that the iPad charger is using.
I have created a sequence of screenshots to show the key steps:

Note I haven’t tested this yet as my iPad doesn’t need charging…

1 Like

This reminded me of a Shortcut that does the opposite…

Clever. I couldn’t figure out how to do that, so I created a Real Simple 2-line automation that would simply speak and tell me that my iPad was charged enough:

Where the 2nd line speaks the following: